From: Keith Packard Date: Wed, 24 Aug 2011 07:29:36 +0000 (-0700) Subject: altosui: Try to get dialogs to look a little better X-Git-Tag: 0.9.7.1~5^2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=3b0a9a1c87390747492bfef435ac8e0829ec748f altosui: Try to get dialogs to look a little better grid bag constraints are not my friend. Signed-off-by: Keith Packard --- diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 51768046..abe08a18 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -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); diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 806b87b9..c11a8614 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -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); diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index dd6672aa..bce4b32c 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -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;