0

I was wondering if it was possible to disable all other action when a JFrame is opened in Java.

Just like this?

enter image description here

Is there easy code for this?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user1992697
  • 315
  • 1
  • 5
  • 11

1 Answers1

4

This has been asked many times and the answer is always the same: use a modal JDialog or JOptionPane (which is a version of a modal JDialog), not another JFrame.

For example, please check out mKorbel's answer here.

Community
  • 1
  • 1
Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373