I'm having a problem, I'm creating a JFrame and I want it to open maximized. I'm using the following code:
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
frame.setLocationRelativeTo(null);
The size of the JFrame is maximized, but the button for me to maximize is still available, so if I click it, it increases the screen a little bit more.
I want to open it actually maximized, with the restore available size button. Does anyone know what's wrong with the code? Or how? Thank you.