Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JCombo AutoComplete - Pattern or Reverse Lookup

I'm using the auto-complete decorator in the swingx library:

AutoCompleteDecorator.decorate( myComboBox );

Which is pretty sweet. However, it only searches forward from the start of the typed text.

So if my combo contains: [Apple, Banana, Grape, Orange] typing 'an' in "strict" mode will not show any results. In non-strict mode nothing is searched either. I'd like it to match 'Banana' & 'Orange' since both items contain my typed text.

Are there any auto-complete libraries that allow for this type of functionality? I would think a strategy approach would work best here, but I'm not finding anything applicable. I'm fine with extending existing functionality - so long as I'm not reinventing the wheel.

Thanks in advance!

like image 418
javamonkey79 Avatar asked May 16 '11 17:05

javamonkey79


1 Answers

AutoComplete for JComboBox and JTextField and by your requirements here you can sets strict false/true Auto complete ComboBox / JFextField and if you'll want to play with code then that's good base for AutoComplete funcionalities for JFormattedTextField

like image 65
mKorbel Avatar answered Sep 20 '22 01:09

mKorbel