I need to position a JFrame on my screen. But I can not make them appear on the right side of the screen.
Please can someone explain to me how to arrange them, if you can describe how to do this, it would be great.
Here is the code so far.
//Gets the screen size and positions the frame left bottom of the screen GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice defaultScreen = ge.getDefaultScreenDevice(); Rectangle rect = defaultScreen.getDefaultConfiguration().getBounds(); int x = (int)rect.getMinX(); int y = (int)rect.getMaxY()- frame.getHeight(); frame.setLocation(x ,y - 45);
Isuru source share