开发者

searching the strings using starting characters in Jlist?

I am creating a search list in java. If I enter the beginning letters, then the corresponding words which belongs to the letters will be display on the Jlist开发者_运维问答.For that is there any build in methods is there? Then how can i search the words with starting characters? Suggest me. Thank in advance..


SwingX has some nice features, including autocomplete. You can get it here

This is how you can use it:

JTextField textField = new JTextField();
textField.setText("Remi");

Vector v = new Vector();
v.add("Jimmy");
v.add("Julie");
v.add("Julien");
v.add("Juliette");

JList list = new JList(v);
Configurator.enableAutoCompletion(list, textField);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜