projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Make initial AltOS window position configurable
[fw/altos]
/
altosui
/
AltosUI.java
diff --git
a/altosui/AltosUI.java
b/altosui/AltosUI.java
index d630ceec763613a38e4fd5abe4c907d9ed9bc0c8..0efe27a0b92985eb662948784860979936f6c272 100644
(file)
--- a/
altosui/AltosUI.java
+++ b/
altosui/AltosUI.java
@@
-224,14
+224,6
@@
public class AltosUI extends AltosUIFrame {
doLayout();
validate();
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
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
@@
-239,6
+231,11
@@
public class AltosUI extends AltosUIFrame {
System.exit(0);
}
});
System.exit(0);
}
});
+
+ setLocationByPlatform(false);
+
+ /* Insets aren't set before the window is visible */
+ setVisible(true);
}
private void ConnectToDevice() {
}
private void ConnectToDevice() {