difficult auto-filterring JComboBox

Hello everybody.

I am now facing such a problem:

Initially, the combo has items as follows:

AAA

ABB

BBB

BCC

After pressed "a", I hope only items "AAA" and "AAB" is displayed because they matches.

Then press "b", I hope only item "ABB" appears because "ABB" contains "ab".

If there is no matches, for example, if I press "x", I hope none of the items displayes.

And when I clear the inupt text, I hope all of the original items appears again just like initinal status.

In one word, I hope every time pressed a key, only the items that contain the current textField's text display.

Would you give me a little hints? A great many of thanks.

Besides, if I want to restrict the input character, for example, only characters in "ABC123" can be entered,

and the letter would be turned into uppercase automatically, what shall I do? Seems there is not convenient

way like JFormattedTextField.

[983 byte] By [sunponda] at [2007-10-1 23:45:41]
# 1
Try this link: http://www.orbital-computer.de/JComboBox/Don't know if there is what you want but it is really great page for automatic completition and your problem can be fixed by a little modification of some of the code that can be found there.LP
lukika at 2007-7-15 15:36:26 > top of Java-index,Desktop,Core GUI APIs...