altosui: Add close button to 'fire' dialog
authorKeith Packard <keithp@keithp.com>
Tue, 9 Aug 2011 03:41:34 +0000 (20:41 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 9 Aug 2011 03:41:34 +0000 (20:41 -0700)
Easier to hit than the tiny close box in the frame.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosIgniteUI.java

index 42120b9..806b87b 100644 (file)
@@ -43,6 +43,7 @@ public class AltosIgniteUI
        JToggleButton   arm;
        JButton         fire;
        javax.swing.Timer       timer;
+       JButton         close;
 
        int             apogee_status;
        int             main_status;
@@ -402,6 +403,16 @@ public class AltosIgniteUI
                fire.addActionListener(this);
                fire.setActionCommand("fire");
 
+               c.gridx = 0;
+               c.gridy = 4;
+               c.gridwidth = 2;
+               c.anchor = GridBagConstraints.CENTER;
+               close = new JButton ("Close");
+               pane.add(close, c);
+               close.addActionListener(this);
+               close.setActionCommand("close");
+                       
+
                pack();
                setLocationRelativeTo(owner);