Question

I have a Java application that uses JDialog boxes for displaying certain information. The JDialog boxes are not minimizable (and shouldn't be), but we've run into a problem specific to Linux KDE desktop (4.3.5, but I believe it probably applies to 4.x). KDE window decorators appear to be overriding Java's and are allowing minimization of JDialog boxes. Windows/Solaris/Linux (GNOME desktops) do not allow minimization of JDialog boxes, it appears to only be KDE. Is there an attribute that I am missing or other way to explicitly say this JDialog box should never be minimized?

Other potentially useful info: Java: JRE 1.6.0_17 Linux: openSUSE and SUSE Enterprise Server (both running KDE 4.3.5)

Was it helpful?

Solution 2

Though I cannot find a way to navigate around the JDialog minimization, I found a work around. Setting the visibility of the display to false, then toggling back to true causes the minimized window to become visible and available again:

myDialog.setVisible(false);
myDialog.setVisible(true);

OTHER TIPS

You can try removing the whole dialog title by calling dialog.setUndecorated(true) but this means that the dialog can't be moved anymore.

This related question also has some pointers: Remove "X" button in Swing JDialog

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top