JComboBox - Arrow Key makes selection instead of merely highlighting
posted 10 years ago
I'm working with code designed by a third party. In that code, a JComboBox opens the list and traverses it with the down and up arrow keys. However, it also selects the list item that gets the focus. That's to say that the list stays open but continues to make the selections with every hit of the up and down arrow keys. Our preference is that the item is merely highlighted by the arrow key (without selecting), and the actual selection would be made when the user hits Enter.
Has anyone encountered this? I think the behavior we're looking for is identical to that of a typical Windows menu bar when it has focus and the down arrow is used.