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