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

PIT: Adding the same popup menu to 2 tray icons throws exception on Solaris but not on win32

    XMLWordPrintable

Details

    • sparc
    • solaris_10

    Description

      I am adding 2 tray icons to system tray from a java application. One of the tray icons have a popup menu and other one does not have. Once they are added to the system tray, I am showing frame with a button. On clicking the button, I am adding the same popup menu to the other tray icon also.

      On Win32, both the tray icons show the popup menu properly when right clicking inside them. But on Sol10-JDS, an exception is thrown when right clicking inside one of the tray icons.
      Here is the exception:
      java.lang.IllegalArgumentException: origin not in parent's hierarchy
      at java.awt.PopupMenu.show(PopupMenu.java:142)
      at sun.awt.X11.XTrayIconPeer.showPopupMenu(XTrayIconPeer.java:247)
      at java.awt.TrayIcon.processMouseEvent(TrayIcon.java:628)
      at java.awt.TrayIcon.processEvent(TrayIcon.java:610)
      at java.awt.TrayIcon.dispatchEvent(TrayIcon.java:601)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)

      This is noticed on the following PIT build:
      java version "1.6.0-awt.pit-int-awt-blade"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-awt-blade-df153228_06_May_2005_08_56-b00)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b35, mixed mode)

      The behavior on Win32 and SolarisSparc are expected to be compatible at application level. If there are any expected incompatibilities, it must be documented clearly.

      I have attached the sample test. Execute the sample test on SparcSol10-JDS. You would see 2 tray icons in the notification area. Right click inside them. You will see a popup menu in one of the tray icons. Click the 'Toggle Popup' button on the frame. Now right click inside the icons. One of the icons would throw the above exception.
      ###@###.### 2005-05-10 18:11:15 GMT

      Attachments

        Issue Links

          Activity

            People

              ant Anton Tarasov (Inactive)
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: