From ece2c86e2641b2cd613791293526c492b1606aa1 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 20 Nov 2010 16:19:42 -0800 Subject: altosui: Rewrite info table to mix with scroll pane well. Fix startup size Using a single table for the info table means that the scroll pane automatically picks up the table headers and shows them above the scrollable view. This patch also fixes the application size at startup so that no scrollbar is required in the info table, and the window is < 800x600. Signed-off-by: Keith Packard --- ao-tools/altosui/AltosDescent.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ao-tools/altosui/AltosDescent.java') diff --git a/ao-tools/altosui/AltosDescent.java b/ao-tools/altosui/AltosDescent.java index abe64fdc..16ccd458 100644 --- a/ao-tools/altosui/AltosDescent.java +++ b/ao-tools/altosui/AltosDescent.java @@ -66,7 +66,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { layout.setConstraints(label, c); add(label); - value = new JTextField(17); + value = new JTextField(Altos.text_width); value.setFont(Altos.value_font); value.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = 4; c.gridy = y; @@ -112,7 +112,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { c.weightx = 0; add(label, c); - value = new JTextField(17); + value = new JTextField(Altos.text_width); value.setFont(Altos.value_font); value.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = x + 2; c.gridy = y; @@ -159,7 +159,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { layout.setConstraints(label, c); add(label); - value1 = new JTextField(17); + value1 = new JTextField(Altos.text_width); value1.setFont(Altos.value_font); value1.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = x + 2; c.gridy = y; @@ -169,7 +169,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { layout.setConstraints(value1, c); add(value1); - value2 = new JTextField(17); + value2 = new JTextField(Altos.text_width); value2.setFont(Altos.value_font); value2.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = x + 4; c.gridy = y; -- cgit v1.2.3