This sections provides information about issues related to using modality.
With the Java SE 6 release, many problems were fixed and many improvements were implemented in the area of AWT modality. If you observe a modality problem with Java SE 1.5 or an earlier release, first upgrade to the latest Java SE release to see if the problem has been already fixed.
Some of the problems that were fixed in Java SE 6 are the following:
Modal dialog goes behind a blocked frame.
Two modal dialogs with the same parent window opened at the same time.
The section addresses the following issues.
UNIX window managers:
Many of the modality improvements are unavailable in some Oracle Solaris or Linux environments, for example, when using Common Desktop Environment (CDE) window managers. With Java SE 6 and later releases, to see if a modality type or modal exclusion type is supported in a particular configuration, use the following methods:
Toolkit.isModalityTypeSupported()
Toolkit.isModalExclusionTypeSupported()
When a modal dialog appears on the screen, the window manager might hide some of the Java top-level windows in the same application from the taskbar. This can confuse end users, but it does not affect their work much, because all the hidden windows are modal blocked and cannot be operated.
Applets:
When your application runs as an applet in a browser and shows a modal dialog, the browser window might become blocked. The implementation of this blocking varies in different browsers and operating systems. For example, on Windows, both Internet Explorer and Mozilla Firefox work correctly, and on Oracle Solaris and Linux operating systems, Mozilla Firefox windows are not blocked. This will be corrected in a future release.
Other modality problems:
For more information on modality-related features and how to use them, see the AWT Modality specification.
One of the sections in that specification describes some AWT features that might be related to or affected by modal dialogs: always-on-top property, focus handling, window states, and so on. Application behavior in such cases is usually unspecified or depends on the platform; therefore, do not rely on any particular behavior.