Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Search ability in JCombox  RSS feed

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have to develop a JComboBox which is editable and when user starts typing, we have search and narrow down the items to the top of the JCombox so that the user pick the one.
Is there any Custom JCombobox code is availabe with this functionality?
Thanks
Sri
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add a keylistener to the jcombobox and scroll to the appropriate entry in the list when a key gets typed.
c
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!