开发者

searching the strings using starting characters in Jlist?

开发者 https://www.devze.com 2022-12-27 18:15 出处:网络
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

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

精彩评论

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

关注公众号