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

Disabling focus traversal keys not working properly for JComboBox in editable mode

XMLWordPrintable

      I am calling setFocusTraversalKeysEnabled(false) for a JComboBox that is editable. I expect the component to ignore the focus traversal keys such as TAB, CTRL+TAB, etc and no focus traversal operation must be initiated. These keys must be processed by the component in the same way as any other keys. But JComboBox initiates a focus traversal operation in spite of calling the above method. On Pressing TAB, focus shifts to the next component.

      This happens on all platforms atleast since 1.4. Reproducible on the latest mustang build (b28). This is reproducible only when JcomboBox is editable. Works fine in non-editable mode.

      I have attached a sample test. Execute the sample test. You would see a frame with 3 components. Make sure JComboBox has the focus. Press 'TAB' or CTRL + TAB. If the focus shifts to the next component (JList), the bug is reproduced.
      ###@###.### 2005-03-26 13:04:59 GMT

            Unassigned Unassigned
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: