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 a commandline interface
|
||||||
- Added XML sandbox for syntax tinkering
|
- Added XML sandbox for syntax tinkering
|
||||||
|
- Added scrollbars to progress popups to show long error messages
|
||||||
|
|
||||||
1.1:
|
1.1:
|
||||||
- Added a button to open the mods/ folder
|
- Added a button to open the mods/ folder
|
||||||
|
|
|
@ -12,12 +12,14 @@ import javax.swing.JButton;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
|
|
||||||
public class ProgressDialog extends JDialog implements ActionListener {
|
public class ProgressDialog extends JDialog implements ActionListener {
|
||||||
|
|
||||||
|
protected JScrollPane statusScroll;
|
||||||
protected JProgressBar progressBar;
|
protected JProgressBar progressBar;
|
||||||
protected JTextArea statusArea;
|
protected JTextArea statusArea;
|
||||||
protected JButton continueBtn;
|
protected JButton continueBtn;
|
||||||
|
@ -43,14 +45,14 @@ public class ProgressDialog extends JDialog implements ActionListener {
|
||||||
getContentPane().add( progressHolder, BorderLayout.NORTH );
|
getContentPane().add( progressHolder, BorderLayout.NORTH );
|
||||||
|
|
||||||
statusArea = new JTextArea();
|
statusArea = new JTextArea();
|
||||||
statusArea.setBorder( BorderFactory.createEtchedBorder() );
|
|
||||||
statusArea.setLineWrap( true );
|
statusArea.setLineWrap( true );
|
||||||
statusArea.setWrapStyleWord( true );
|
statusArea.setWrapStyleWord( true );
|
||||||
statusArea.setEditable( false );
|
statusArea.setEditable( false );
|
||||||
|
statusScroll = new JScrollPane( statusArea );
|
||||||
|
|
||||||
JPanel statusHolder = new JPanel( new BorderLayout() );
|
JPanel statusHolder = new JPanel( new BorderLayout() );
|
||||||
statusHolder.setBorder( BorderFactory.createEmptyBorder( 15, 15, 15, 15 ) );
|
statusHolder.setBorder( BorderFactory.createEmptyBorder( 15, 15, 15, 15 ) );
|
||||||
statusHolder.add( statusArea );
|
statusHolder.add( statusScroll );
|
||||||
getContentPane().add( statusHolder, BorderLayout.CENTER );
|
getContentPane().add( statusHolder, BorderLayout.CENTER );
|
||||||
|
|
||||||
continueBtn = new JButton( "Continue" );
|
continueBtn = new JButton( "Continue" );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue