Java 6, JFrame stuck alwaysontop

做~自己de王妃 提交于 2019-12-23 04:02:32

问题


This issue only seems to occur since I upgraded from 1.5 to 1.6

The main JFrame, randomly seems to get stuck infront of every other application in windows.

Even another JDialog popping up set to alwaysontop(true) will be behind this main JFrame.

Any ideas on what could be causing this issue? / Any ideas for solutions? Never had this issue before on Java 5.


回答1:


Sorry guys it seems it was a program used as a screen splicer that was causing an issue with th Java program. Once the screen splicer was uninstalled, the issue has not occured.




回答2:


I also have this issue for a long time now and was able to reproduce it.

While a modal always-on-top dialog is open in front of the frame, click the frame. The frame inherits the always-on-top behaviour, even if it is not set to stay on top.

I found an article about this behaviour here.

The simple solution: Dialogs must not be modal and always on top at the same time. Modalarity already includes an always-on-top-behaviour.



来源:https://stackoverflow.com/questions/4014631/java-6-jframe-stuck-alwaysontop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!