Just set the location for the Dialog to 0,0 and it will be under the the Frame. Now once the Dialog is shown, the frame never gets placed over the Dialog again. So this method is no valid.
Originally posted by G Vanin:
setVisible(boolean b) in java.awt.component has the only line in it, guess what and nothing else.
From David M.Geary Graphic Java 1.2. Vol.1 AWT. The Sun Microsystems Press, Chapter 16, p.574
Invoke toFront() After show() for Windows That Are not Visible
Window.show() is guaranteed to bring the window being shown to the front only if the window is currently visible.
If the window is not visible, show() makes no such guarantee.
Therefore, to ensure that a window being shown will wind up in front of all other windows, invoke toFront() after calling show().