Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6746212

Broken MouseEvents for TrayIcon

XMLWordPrintable

    • b48
    • x86
    • windows, windows_vista
    • Verified

      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!

            dav Andrei Dmitriev (Inactive)
            jisedlac Jirí Sedlácek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: