I have an applet which has two buttons on it:
When we click Button1 a Frame is opened.
When we click Button2 a Dialog (which is a child the new frame) is presented.
Now suppose if when we click on Button1 then the new frame that is opened is now positioned behind my applet and not completely aligned with it (not minimized)
Now, when I press Button2 the Dialog that pops up is in front of my applet, but when I click on the header of the dialog, then both the applet and frame are brought forward (they both get displayed simultaneously).
So I basically want to have just the applet behind the dialog whenever it is clicked (leaving the Frame in the background)
Add a
frame.setVisible(false);in Button2‘s ActionListener.