When that other window is destroyed, so are its dependent dialogs. When the window is returned to its normal state, its dependent dialogs return to the screen. The AWT automatically provides this behavior to you. Because no API currently exists to let applets find the window they're running in, applets generally can't use dialogs. For this reason, the following applet consists of a button that brings up a window that brings up a dialog.
Dialogs can be modal .
Modal dialogs require the user's attention, preventing the user from doing anything else in the dialog's application until the dialog has been dismissed. Due to a bug in the 1.0 release, you can't create custom Dialog subclasses that are modal. This is fixed in the 1.0.2 release. Here's the code for the window that the above applet brings up. Like the constructor used above, but doesn't set the title of the dialog window.