diff options
author | Keith Packard <keithp@keithp.com> | 2013-01-20 15:42:05 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-01-20 15:45:16 -0800 |
commit | 3454592169dcb61b81de9af2b631b87e7dd86231 (patch) | |
tree | f0c164421914de1363d09c464200d55c82325364 /altosui/AltosUI.java | |
parent | cf03ab3383b679e6617e8ab7004be91e5a727562 (diff) |
altosui: Make initial AltOS window position configurable
Give the user a choice of nine locations on the screen
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosUI.java')
-rw-r--r-- | altosui/AltosUI.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index d630ceec..0efe27a0 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -224,14 +224,6 @@ public class AltosUI extends AltosUIFrame { doLayout(); validate(); - setVisible(true); - - Insets i = getInsets(); - Dimension ps = rootPane.getPreferredSize(); - ps.width += i.left + i.right; - ps.height += i.top + i.bottom; - setPreferredSize(ps); - setSize(ps); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override @@ -239,6 +231,11 @@ public class AltosUI extends AltosUIFrame { System.exit(0); } }); + + setLocationByPlatform(false); + + /* Insets aren't set before the window is visible */ + setVisible(true); } private void ConnectToDevice() { |