开发者

Way to force KDE to not allow minimization of Java JDialog elements?

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: ope开发者_如何学PythonnSUSE and SUSE Enterprise Server (both running KDE 4.3.5)


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


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜