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
  • 166,747
  • 40
  • 210
  • 420
user1992697
  • 315
  • 1
  • 4
  • 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
  • 280,125
  • 25
  • 247
  • 360