事件发生时要显示JFrame?

编程入门 行业动态 更新时间:2024-10-27 13:22:42
本文介绍了事件发生时要显示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?

本文发布于:2023-11-06 16:16:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564185.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时要   发生   事件   JFrame

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!