问题
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