fixed frame y location

This commit is contained in:
nathan 2015-07-28 02:22:04 +02:00
parent 1abb0735ae
commit 9c18128b2d

View File

@ -30,7 +30,7 @@ class SwingUtil {
GraphicsDevice deviceAtMouse = getGraphicsDeviceAt(mouseLocation); GraphicsDevice deviceAtMouse = getGraphicsDeviceAt(mouseLocation);
Rectangle bounds = deviceAtMouse.getDefaultConfiguration() Rectangle bounds = deviceAtMouse.getDefaultConfiguration()
.getBounds(); .getBounds();
frame.setLocation(bounds.x + bounds.width / 2 - frame.getWidth() / 2, bounds.height / 2 - frame.getHeight() / 2); frame.setLocation(bounds.x + bounds.width / 2 - frame.getWidth() / 2, bounds.y + bounds.height / 2 - frame.getHeight() / 2);
} }
public static public static