Search code examples
javaswingjframejmenu

Disable JFrame but Want Access to Menu Windows


I dont know how to make this with simple and easy code. I can just go to each piece of my code and use setEnabled to false on each component, but I want a easy way.

I want to disable the entire frame, but still want to close/maximize/minize it. do you understand?

And if I use setEnabled(false) on my frame, it disables that options too, the options of windows menu bar you know?

Thanks alot in advance..


Solution

  • Simple,Put all your components in a JPanel and disable the JPanel :-)