Search code examples
javaswingjframeresizable

Unexpandable Window


While using JFrame, is it possible to have the window unable to be expanded by the user?


Solution

  • 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);