Combo Box and Java Search Component

My goal is to create some kind of swing component that can do two things:

  • Function as a combo box (select from a list of values)
  • Allow the user to enter into the component and display only the relevant elements from the source list (for example, some AJAX search windows online).

I would really like to do this by customizing the existing swing component, so I do not need to write it from scratch, but so far I have not found anything that could do this. I looked at the huge number of hacks that might be required to possibly get a JComboBox, but I really don't think this will work.

Any recommendations on what is the best way to do this? Bonus points for solutions that are not 100% user code.

+4
source share
1 answer

In the search lines you can find autocomplete .

A combobox that supports what you want for sure exists in several libraries with just one example:

Glazed Lists

The following site contains several samples (for glazed sheets) and further links to other libraries. This is a bit outdated, but I think the information is still ok.

Adding Swing Comboboxes Autofill Support

+3
source

All Articles