So, I have a JFrame
. Nothing special about it, besides:
this.setResizable(false);
I do this, because I do not want the user to change the size of the window during its normal (non-maximized non-minimized) state.
However, I still want the user to be able to maximize the JFrame
, but that line of code not only disables the possibility of re-sizing the window with the mouse, but also the possibility of re-sizing with the maximize button, since it gets locked.
(Possible solutions I see are either enabling the maximize button after I set the resizability to false, or preventing the mouse from resizing the window, without using the line above)
So, how do I prevent the user from resizing my window manually while still being able to maximize it?