I have made a GUI in Netbeans. Now I want that the frame size should remain constant, means the user cannot do maximize or r开发者_JAVA技巧estore the frame.
When I go the the frame properties dialog box, I didn't see any property that allow me to set the size of the frame.
I opened the frame properties dialog box by right clicking on the "FrameView" node in the "Inspector" window.
How can I do that?
Uncheck "resizable
". That will prevent the user from changing the window size.
Next, set the preferredSize
property (if you're using java.awt.Frame instead of JFrame set the minimumSize
property instead).
精彩评论