Auto complete combo box in java problems

坚强是说给别人听的谎言 提交于 2019-12-13 00:40:48

问题


I am using

import org.jdesktop.swingx.autocomplete.Configurator;
Configurator.enableAutoCompletion(combo); 

to make my combo box auto complete. But this is not working. My combo box name is combo. When i am importing NetBeans says that that import org.jdesktop.swingx.autocomplete.Configurator; does not exists. Can anyone suggest a simple way to auto complete the combo box. I cannot add more lines of codes because i have some restriction in terms of lines of codes for this project.


回答1:


You have to download the .jar- File ( for example from here: http://repo1.maven.org/maven2/org/swinglabs/swingx/swingx-all/1.6.3/swingx-all-1.6.3.jar

You then go to File > Project Properties > Libraries > Compile-Time Libraries in your Netbeans Project and add the .jar you just downloaded.



来源:https://stackoverflow.com/questions/22576217/auto-complete-combo-box-in-java-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!