Reputation: 1093
Recently i m working on a s/w project which require an editable combo box... At start i attached action Listener whith it but it didnt worked... Then i started searching over document listener which seems to be suitable for this situation
I want to create this
-------------------------
a //---------- Consider this as a combo box
-------------------------
a
ab
aba
abca
abdaa
---------------------
ab //---------- Consider this as a combo box
---------------------
ab
aba
abca
abdaa //- Hints
Now i am bit confused how to use document listener with combo box , because every where JTextComponent
is attached with it.... Please help.
Upvotes: 3
Views: 778
Reputation: 5782
Here's an implementation of what you're looking for: Searchable JComboBox
Upvotes: 1