I am making a game, so I want the JFrame to start maximized, but I also don’t want users resizing the game, as it would screw up the graphics. I am wondering how to do both at the same time?
Right now, I can use JFrame.setExtendedState(JFrame.MAXIMIZED_BOTH) to maximize, but as soon as I do JFrame.setResizeable(false), I can’t use setExtendedState() to maximize it anymore.
I realize I can just maximize it, store the width and height, then use that, but if possible I would prefer for the window to actually look like it is maximized. The title bar changes when it is maximized versus when it is just sized to fill the screen, if anyone knows what I am talking about.
This works for me: