开发者

Netbeans - How to do setsize() of a frame?

开发者 https://www.devze.com 2022-12-09 19:37 出处:网络
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.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号