JFrame to be displayed when the event occurs?

穿精又带淫゛_ 提交于 2020-01-06 04:53:06

问题


I have a JFrame which pops up when the event occurs. I am having a functionality which when the event occurs the JFrame pops up and if we click on that Frame it will open the corresponding frame, but the issue is when I am not clicking the popped up frame when the event occurs, if another event comes its displays the frame in the taskbar in a blinking state but not in an open state, I want to display the frame as it is without the frame blinking in the taskbar???? Any suggestions???


回答1:


I already had such problem. try to call

frame.setAlwaysOnTop(true);

Then if you do not need this frame to appear on top always call

frame.setAlwaysOnTop(false);



来源:https://stackoverflow.com/questions/4023281/jframe-to-be-displayed-when-the-event-occurs

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