fixed frame y location
This commit is contained in:
parent
1abb0735ae
commit
9c18128b2d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user