Is there any way to make a window 开发者_如何转开发fixed so that the user can't change the window size in java?
The Frame
class (and its child JFrame
class for Swing) there is a setResizable
method which will set whether or not a Frame
can be resized or not.
JFrame myFrame= new JFrame();
myFrame.setResizable(false);
My solution.
In the Frame class, there is a setResizable method which will set whether or not a Frame can be resized or not. So, if you want to fixed window than just write setResizable(false).
精彩评论