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

Trying to Filter JCombobox  RSS feed

 
Dhiren Lodhia
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JComboBox wiith name of countries in it.i want it to be editable.when the use will type initial few letters the items in JCombobox will get filtered.
i have managed to write the filtering code.
following code does the filtering of items as the user types in to the JCombobox it works fine.


my only problem is after selecting some item from popup menu when i press Enter it does not get set in the JComboBox ???

can i do it without making the my simple code too complicated??

Thanks in advance...
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you mean this?

http://tech.chitgoks.com/2009/11/06/autocomplete-jcombobox/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!