Set main frame not resizable

Bulit picture Bulit · Jan 27, 2012 · Viewed 18.9k times · Source

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.

Answer

Kai picture Kai · Jan 27, 2012

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