MouseEvents coming from TrayIcon when using JDK 7 seem to be broken, mouseClicked is not fired. When using JDK 6 everything works as expected - regression?
This can be easily reproduced using example code provided at http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray (http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/SystemTrayExample.zip).
Expected behavior:
When running the example using JDK 6u7, this output is being generated by a single mouse click on a trayicon:
Tray Icon - Mouse pressed!
Tray Icon - Mouse released!
Tray Icon - Mouse clicked!
Actual (incorrect) behavior:
When running the example using JDK 7 b34, this output is being generated by a single mouse click on a trayicon (Mouse clicked is missing):
Tray Icon - Mouse pressed!
Tray Icon - Mouse released!
I've also noticed another strange behavior occuring for both JDK 6 and JDK 7 - while a message is displayed for a trayicon (doubleclick in the example), mousePressed event is not fired. This output is being generated by a single mouse click on a trayicon with a message displayed (Mouse pressed is missing):
Tray Icon - Mouse released!
Tray Icon - Mouse clicked!