X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosUI.java;h=0efe27a0b92985eb662948784860979936f6c272;hp=d630ceec763613a38e4fd5abe4c907d9ed9bc0c8;hb=3454592169dcb61b81de9af2b631b87e7dd86231;hpb=cf03ab3383b679e6617e8ab7004be91e5a727562 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() {