Search code examples
javaswingresizable

Set main frame not resizable


I want to set my main frame (whole application) not resizable by the user. Can anyone tell me how to do it?

When I set minimum and maximum size in layout design it does not work. I'm still able to resize the whole application.


Solution

  • Assuming you are using Swing and a JFrame, call setResizable(false).