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

Choice's drop-down does not disappear when parent frame is iconified

XMLWordPrintable

    • b51
    • sparc
    • solaris_9
    • Verified

      I have a frame with a Choice. I have added an ItemListener to it and inside itemStateChanged(), I am trying to iconify the frame through setExtendedState() method call. The user clicks the choice and the drop-down is shown. Now press UP / DOWN arrow so that an item event gets triggered. Once ItemEvent is triggered, I am minimizing the frame inside the listener and restoring it. When the frame gets minimized, the drop-down part of the choice still stays on the screen. I think it must also be hidden when the parent frame is hidden.

      This is noticed on Motif as well as XToolkit on unix platforms, atleast since 1.4.2. The behavior on Win32 is slightly different. The drop-down hides when the parent frame gets iconified but choice triggers an extra ItemStateChanged event when the frame gets restored. Also I could see a flicker when the frame gets restored.

      I have attached a sample test. Execute the test. Click on the Choice. press UP/DOWN arrow key. The frame will be iconified. You will notice that the drop-down stays there. On Win32, you would see an extra item event and a flicker.
      ###@###.### 2005-04-26 12:22:06 GMT

      I have noticed a strange behavior related to the above one. I am clicking the choice. The drop-down appears. Pressing UP/DOWN arrow key. Item Event gets triggered and the frame is hidden. The drop-down stays on the screen. When the frame is restored, I am clicking on the title of the frame and moving it. The frame moves to a different location but the drop-down still stays where it was shown initially. Clicking the native apps, frame's title bar does not make the drop-down disappear. This is noticed only on XAWT and not seen on Motif. This is pretty embarassing.

      ###@###.### 2005-04-28 10:28:32 GMT

            dav Andrei Dmitriev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: