List of utility methods to do Window Size
Rectangle | getRectangle(Window win) Get a Rectangle object representing the given window's position and magnitude in space.
return new Rectangle(win.getY(), win.getX(), win.getWidth(), win.getHeight()); |
Rectangle | getRectangle(Window win) Get a Rectangle object representing the given window's position and magnitude in space.
Rectangle Rectangle = new Rectangle(win.getY(), win.getX(), win.getWidth(), win.getHeight()); return Rectangle; |
void | setWidthPercentageOfScreen(Window window, int widthPercentage) set Width Percentage Of Screen Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int width = (screenSize.width * widthPercentage) / 100; int height = window.getHeight(); window.setSize(width, height); center(window); |