开发者

Java TrayIcon message close button

开发者 https://www.devze.com 2022-12-13 09:09 出处:网络
The real question here might be if there\'s a better way to display desktop messages in Java.However...

The real question here might be if there's a better way to display desktop messages in Java. However...

I'm using the Java trayicon to display messages to a desktop user. Because they want to keep certain messages up until the user clicks on them, in order to use the 'displayMessage' feature, I have to keep displaying them until the user clicks on them and I get an action command. However, if the user clicks on the little close button, I don't get an action command.

I'm developing this on linux, but the users are on windows, which complicates the testing. Also, obviously this isn't what the trayicon functionality was designed for, so if there's a better way to do this, let me know.

Thanks in开发者_如何学编程 advance.


What about just using a dialog window, e.g. java.swing.JOptionPane.showConfirmDialog(...)?

Here's an article about it: http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html

0

精彩评论

暂无评论...
验证码 换一张
取 消