Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to Filter JCombobox

 
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/
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!