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

Non-Focusable choice throws exception when selecting an item, Win32

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b79
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      Do the following to reproduce the bug:

      Run the attached sample code. You will see a button and a choice. Click on the button. This will make the choice unfocusable. Now click on the choice. The drop-down will appear. Move the mouse over one of the items and make sure it gets highlighted. Move the mouse out of the drop-down (the item should still remain highlighted). Now press 'SPACE BAR'. You will see an IllegalArgumentException on the console.

      This is reproducible only on Win32 and I reproduced it using Mustang-b72. It is also reproducible on b75 PIT build. This is not reproducible on XToolkit.

      Here is the exception:
      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: illeg
      al Choice item position: -1
      at java.awt.Choice.select(Choice.java:413)
      at sun.awt.windows.WChoicePeer$1.run(WChoicePeer.java:85)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: