src/gui/GUI.java
public static void centerWindow(Window frame, int width, int height) {
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) (dimension.getWidth() - frame.getWidth() - width) / 2;
        int y = (int) (dimension.getHeight() - frame.getHeight() - height) / 2;
        frame.setLocation(x, y);
    }
// It centers the window on screen.
It centers the window on screen.
It centers the window on screen .
public static void centerWindow(Window frame, int width, int height) {
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) (dimension.getWidth() - frame.getWidth() - width) / 2;
        int y = (int) (dimension.getHeight() - frame.getHeight() - height) / 2;
        frame.setLocation(x, y);
    }
public static void centerWindow ( Window frame , int width , int height ) { Dimension dimension = Toolkit . getDefaultToolkit ( ) . getScreenSize ( ) ; int x = ( int ) ( dimension . getWidth ( ) - frame . getWidth ( ) - width ) / 2 ; int y = ( int ) ( dimension . getHeight ( ) - frame . getHeight ( ) - height ) / 2 ; frame . setLocation ( x , y ) ; }
It centers the window on screen.
It centers the window on screen .