Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是一名在 Yahoo! 上工作的计算机科学专业的学生。用 Java 实现的类似 Messenger 的程序。
我的问题是,每当JTextArea我的框架内部包含新的消息更新时,即使他/她的框架被最小化,也必须提示用户。JFrame收到更新时如何使任务栏上的 闪烁是否有解决方法?
JTextArea
JFrame
简而言之,我需要一种方法来通知用户框架已被更新,即使它已被最小化。
我怎样才能做到这一点?
您可以使用JFrame.toFront(),尽管我认为这不是做您想做的事情的最佳方式。
JFrame.toFront()