summaryrefslogtreecommitdiff
path: root/sources/utils/VSFrame.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-19 16:24:25 +0000
committerPaul Buetow <paul@buetow.org>2008-05-19 16:24:25 +0000
commit1737afec7bc9b13e31934913510ff00aa2cdb5d3 (patch)
tree1c0b07f5ab1b651ed3775d79a0681533cbe2f59e /sources/utils/VSFrame.java
parent3f40213c906b4017d56ef31a9a82f0b5d0905229 (diff)
Anti-Aliasing checkbox works.
Diffstat (limited to 'sources/utils/VSFrame.java')
-rw-r--r--sources/utils/VSFrame.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/sources/utils/VSFrame.java b/sources/utils/VSFrame.java
index 32392b8..608011b 100644
--- a/sources/utils/VSFrame.java
+++ b/sources/utils/VSFrame.java
@@ -51,17 +51,19 @@ public class VSFrame extends JFrame {
y = (int) location.getY() + Y_LOCATION_OFFSET;
}
- if (x + super.getWidth() >= screenSize.width)
- x = screenSize.width - super.getWidth();
+ if (x + super.getWidth() >= screenSize.width)
+ x = screenSize.width - super.getWidth();
+ else if (x < 0)
+ x = 0;
- if (y + super.getHeight() >= screenSize.height)
- y = screenSize.height - super.getHeight();
+ if (y + super.getHeight() >= screenSize.height)
+ y = screenSize.height - super.getHeight();
super.setLocation(x, y);
}
- public void setSize(int width, int height) {
- super.setSize(width, height);
- setCorrectLocation();
- }
+ public void setSize(int width, int height) {
+ super.setSize(width, height);
+ setCorrectLocation();
+ }
}