summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-24 00:29:36 -0700
committerKeith Packard <keithp@keithp.com>2011-08-24 00:29:36 -0700
commit3b0a9a1c87390747492bfef435ac8e0829ec748f (patch)
tree78e6e6987004a172a6a6116238d07616cb032837
parent2165e82327faaada23f0503b8e49b80f938b746c (diff)
altosui: Try to get dialogs to look a little better
grid bag constraints are not my friend. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosui/AltosFlightUI.java7
-rw-r--r--altosui/AltosIgniteUI.java5
-rw-r--r--altosui/AltosScanUI.java2
3 files changed, 10 insertions, 4 deletions
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;