Added scrollbars to ProgressDialog
This commit is contained in:
parent
2bf7951eff
commit
ef23cd4bf5
2 changed files with 5 additions and 2 deletions
|
@ -3,6 +3,7 @@ Changelog
|
|||
???:
|
||||
- Added a commandline interface
|
||||
- Added XML sandbox for syntax tinkering
|
||||
- Added scrollbars to progress popups to show long error messages
|
||||
|
||||
1.1:
|
||||
- Added a button to open the mods/ folder
|
||||
|
|
|
@ -12,12 +12,14 @@ import javax.swing.JButton;
|
|||
import javax.swing.JDialog;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
|
||||
public class ProgressDialog extends JDialog implements ActionListener {
|
||||
|
||||
protected JScrollPane statusScroll;
|
||||
protected JProgressBar progressBar;
|
||||
protected JTextArea statusArea;
|
||||
protected JButton continueBtn;
|
||||
|
@ -43,14 +45,14 @@ public class ProgressDialog extends JDialog implements ActionListener {
|
|||
getContentPane().add( progressHolder, BorderLayout.NORTH );
|
||||
|
||||
statusArea = new JTextArea();
|
||||
statusArea.setBorder( BorderFactory.createEtchedBorder() );
|
||||
statusArea.setLineWrap( true );
|
||||
statusArea.setWrapStyleWord( true );
|
||||
statusArea.setEditable( false );
|
||||
statusScroll = new JScrollPane( statusArea );
|
||||
|
||||
JPanel statusHolder = new JPanel( new BorderLayout() );
|
||||
statusHolder.setBorder( BorderFactory.createEmptyBorder( 15, 15, 15, 15 ) );
|
||||
statusHolder.add( statusArea );
|
||||
statusHolder.add( statusScroll );
|
||||
getContentPane().add( statusHolder, BorderLayout.CENTER );
|
||||
|
||||
continueBtn = new JButton( "Continue" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue