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

JComboBox does not trigger any FocusEvent when in editable mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs

      I am adding a JComboBox to a JFrame and I have added a FocusListener to it. I expect the component to trigger FocusGained event when gaining focus. But when the JcomboBox is editable, it does not trigger any focus events when it gains / loses focus. When it is changed to non-editable, it triggers the focus events properly. This is incorrect. Support for FocusEvent is a basic functionality and hence must be supported.

      This is reproducible on all platforms atleast since 1.4. Reproducible on Mustang-b28 also.

      I have attached a sample test. Execute the sample test. Press TAB key repeatedly. Focus traverses through all the components. Check whether any focus event is triggered on the console (especially with source as JComboBox). Click the button to toggle the editability of JComboBox. Try the above operation when combo box is non-editable. You would notice that the combo box does not trigger any focus events when in editable mode.
      ###@###.### 2005-03-26 13:54:22 GMT

            shickeysunw Shannon Hickey (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: