JCombo AutoFill - Sample or Reverse Lookup

I use an autocomplete decorator in the swingx library :

AutoCompleteDecorator.decorate( myComboBox );

This is pretty sweet. However, it only searches from the beginning of the typed text.

So, if my combo contains: [Apple, Banana, Grape, Orange], entering "an" in "strict" mode will not show any results. In lax mode, nothing is done. I would like it to match β€œBanana” and β€œOrange,” since both elements contain my typed text.

Are there autocomplete libraries that allow this type of function to be used? I would think that a strategic approach would work best here, but I find nothing applicable. I'm fine with expanding existing functionality - until I invent the wheel.

Thanks in advance!

+6
source share
1 answer

JComboBox for JComboBox and JTextField and your requirements here you can set strict false / true Autocomplete ComboBox / JFextField and if you want to play with the code, then this is a good base for autocomplete functions for JFormattedTextField

+4
source

Source: https://habr.com/ru/post/888243/


All Articles