事件发生时要显示JFrame? [英] JFrame to be displayed when the event occurs?

查看:62
本文介绍了事件发生时要显示JFrame?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JFrame,该JFrame在事件发生时会弹出.我有一个功能,当事件发生时,JFrame会弹出,如果我们单击该框架,它将打开相应的框架,但是问题是当事件发生时,如果另一个事件到来,我没有单击弹出的框架它在任务栏中以闪烁状态显示框架,但不是在打开状态,我想按原样显示框架,而在任务栏中框架没有闪烁??? 有任何建议吗?

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???

推荐答案

我已经遇到了这样的问题.尝试致电

I already had such problem. try to call

frame.setAlwaysOnTop(true);

frame.setAlwaysOnTop(true);

然后,如果您不需要此框出现在顶部始终呼叫

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

frame.setAlwaysOnTop(false);

frame.setAlwaysOnTop(false);

这篇关于事件发生时要显示JFrame?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆