Reputation: 2266
My goal is to create some kind of swing component that can do two things:
I would really like to do this by customizing an existing swing component so I don't have to write it from scratch, but so far I have not found anything that can do this. I have considered the massive amounts of hacks that it would take to possibly get a JComboBox to do this, but I don't really think that will work.
Any recommendations on what the best way to do this would be? Bonus points for solutions that aren't 100% custom code.
Upvotes: 4
Views: 3977
Reputation: 54605
What you are looking for can be found be using autocomplete in your search strings.
Comboboxes which support what you want for sure exist in several libraries just one example:
The following site contains a few samples (for glazedlists too) and further links to other libraries. It's a bit dated but I guess the information is still ok.
Adding Auto-Completion Support to Swing Comboboxes
Upvotes: 3