Skip to main content
gamedev.net
🔒 Locked

[java] JFrame.setResizable(false)

Started by Halsafar 1 reply 2.5k views
Original Post
Halsafar
Halsafar
As soon as I add to my frame loading code frame.setResizeable(false); My frame always opens as the smallest possible size it can be. Ends up being the size of the mouse cursor... I am calling setBounds(....) before hand. I dunno whats going on. Edit: Apparently it was frame.pack() which was causing this problem. But now my MenuBar doesn't show up sometimes when I start the app.
H_o_p_s
H_o_p_s
I always use setSize(int width, int height), I'm not sure if that'll make any difference though... as far as your menubar problem, if you take out the setResizable() does it still do it? Because I don't see how these problems are related...
BRING BACK THE BLACK (or at least something darker)
Shabadoo
Shabadoo
The menu bar not showing up sounds like an AWT/Swing drawing thread starvation problem. Are you trying to draw or do lots of things in the frame when the app starts?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.