From 1737afec7bc9b13e31934913510ff00aa2cdb5d3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 19 May 2008 16:24:25 +0000 Subject: Anti-Aliasing checkbox works. --- sources/utils/VSFrame.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sources/utils/VSFrame.java') 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(); + } } -- cgit v1.2.3