0

I have a main frame with a bunch of buttons. Each of which will create additional frames and more frames spawned from there. BUT: When ever a frame is created and set visible, all frames created and displayed before should not be selectable, but still visible (i.e. No user input should be possible there). How can I prevent activity in older frames till the latest frame is disposed off? How can I restore focus for the previous frames afterwards?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Manu
  • 65
  • 1
  • 4
  • See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/a/9554657/418556) And yes, this would call for a modal dialog or `JOptionPane` as mentioned by JB Nizet. – Andrew Thompson Dec 16 '12 at 06:58

1 Answers1

1

What you describe is called a modal dialog box. Checkout JDialog and the swing tutorial about dialogs.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • I am not sure I see how to solve my problem. Will keep exploring. Will post when I do have some solution. – Manu Dec 16 '12 at 09:40