开发者

Unexpandable Window

开发者 https://www.devze.com 2023-02-24 17:16 出处:网络
While using JFrame, is it开发者_Go百科 possible to have the window unable to be expanded by the user?This is what you want. It explains it setResizable() method.

While using JFrame, is it开发者_Go百科 possible to have the window unable to be expanded by the user?


This is what you want. It explains it setResizable() method.

EDIT: If you would like a quick introduction, say your JFrame object is called myFrame, then, to make it non-resizable,

myFrame.setResizable(false);


You just need call setResizable(false) on your JFrame, e.g.:

JFrame frame = new JFrame();
frame.setSize(500, 300);
frame.setResizable(false);
frame.setVisible(true);
0

精彩评论

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