本文介绍了强制KDE不允许最小化Java JDialog元素的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java应用程序,该应用程序使用JDialog框显示某些信息. JDialog框不可最小化(也不应该),但是我们遇到了Linux KDE桌面特有的问题(4.3.5,但我认为它可能适用于4.x). KDE窗口装饰器似乎覆盖了Java,并允许最小化JDialog框. Windows/Solaris/Linux(GNOME桌面)不允许最小化JDialog框,它似乎只是KDE.是否存在我所缺少的属性或以其他方式明确表示不应将此JDialog框最小化?

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?

其他可能有用的信息:Java:JRE 1.6.0_17Linux:openSUSE和SUSE Enterprise Server(均运行KDE 4.3.5)

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

推荐答案

尽管我找不到在JDialog最小化方面进行导航的方法,但还是找到了解决方法.将显示的可见性设置为false,然后切换回true,将使最小化的窗口变得可见并再次可用:

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

这篇关于强制KDE不允许最小化Java JDialog元素的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 11:48