tags:

views:

130

answers:

1

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.

A: 

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

William