Skip to content

Commit

Permalink
Merge pull request #2857 from mattharris/withrottle-ui-update
Browse files Browse the repository at this point in the history
Allow WiThrottle window to be resized
  • Loading branch information
mattharris committed Jan 12, 2017
2 parents 25ea557 + 7776493 commit 8ce3ca6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/src/jmri/jmrit/withrottle/UserInterface.java
Expand Up @@ -174,7 +174,8 @@ protected void createWindow() {
con.ipadx = 10;
con.ipady = 10;
con.gridheight = 3;
con.gridwidth = 3;
con.gridwidth = GridBagConstraints.REMAINDER;
con.fill = GridBagConstraints.BOTH;
panel.add(scrollTable, con);

// Create the menu to use with WiThrottle window. Has to be before pack() for Windows.
Expand All @@ -184,7 +185,7 @@ protected void createWindow() {
this.setTitle("WiThrottle");
this.pack();

this.setResizable(false);
this.setResizable(true);
Rectangle screenRect = new Rectangle(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());

// Centers on top edge of screen
Expand All @@ -193,6 +194,7 @@ protected void createWindow() {
this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);

setVisible(true);
setMinimumSize(getSize());

rosterGroupSelector.addActionListener(new ActionListener() {

Expand Down

0 comments on commit 8ce3ca6

Please sign in to comment.