altosui: Try to get dialogs to look a little better
authorKeith Packard <keithp@keithp.com>
Wed, 24 Aug 2011 07:29:36 +0000 (00:29 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 24 Aug 2011 07:29:36 +0000 (00:29 -0700)
grid bag constraints are not my friend.

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

index 517680463c4f794ffb89ccdc7555c0e22e7c44f0..abe08a182a04d4e6cae8deaf6b1bdad6779cfeea 100644 (file)
@@ -172,7 +172,10 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
                        });
                        c.gridx = 0;
                        c.gridy = 0;
+                       c.weightx = 0;
+                       c.weighty = 0;
                        c.insets = new Insets(3, 3, 3, 3);
+                       c.fill = GridBagConstraints.NONE;
                        c.anchor = GridBagConstraints.WEST;
                        bag.add (frequencies, c);
 
@@ -186,6 +189,8 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
                                telemetry = Altos.ao_telemetry_standard;
                        telemetries.setSelectedIndex(telemetry - 1);
                        telemetries.setMaximumRowCount(Altos.ao_telemetry_max);
+                       telemetries.setPreferredSize(null);
+                       telemetries.revalidate();
                        telemetries.addActionListener(new ActionListener() {
                                        public void actionPerformed(ActionEvent e) {
                                                int telemetry = telemetries.getSelectedIndex() + 1;
@@ -195,6 +200,8 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
                                });
                        c.gridx = 1;
                        c.gridy = 0;
+                       c.weightx = 0;
+                       c.weighty = 0;
                        c.fill = GridBagConstraints.NONE;
                        c.anchor = GridBagConstraints.WEST;
                        bag.add (telemetries, c);
index 806b87b9d4e9fcdb60d7eb27a1d4e6c508461b52..c11a86145ce1a68b0d8768cfa75a920469f25272 100644 (file)
@@ -341,8 +341,8 @@ public class AltosIgniteUI
                c.fill = GridBagConstraints.NONE;
                c.anchor = GridBagConstraints.CENTER;
                c.insets = i;
-               c.weightx = 1;
-               c.weighty = 1;
+               c.weightx = 0;
+               c.weighty = 0;
 
                c.gridx = 0;
                c.gridy = 0;
@@ -412,7 +412,6 @@ public class AltosIgniteUI
                close.addActionListener(this);
                close.setActionCommand("close");
                        
-
                pack();
                setLocationRelativeTo(owner);
 
index dd6672aa29886a41ebea1140dc0eb9d9f8d918b2..bce4b32c9ef02e19db030e33eb77a5e5a2558005 100644 (file)
@@ -386,7 +386,7 @@ public class AltosScanUI
                
                set_label();
 
-               c.fill = GridBagConstraints.NONE;
+               c.fill = GridBagConstraints.HORIZONTAL;
                c.anchor = GridBagConstraints.WEST;
                c.insets = i;
                c.weightx = 1;