• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox - Arrow Key makes selection instead of merely highlighting  RSS feed

 
Dandi Wayne
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Any help would be greatly appreciated.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!