• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Trying to Filter JCombobox

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you mean this?

http://tech.chitgoks.com/2009/11/06/autocomplete-jcombobox/
reply
    Bookmark Topic Watch Topic
  • New Topic