how to make an autocomplete combobox in javafx 2.x using modern .fxml and controller.java [duplicate]

半世苍凉 提交于 2019-12-01 12:47:02

问题


how to make a similer autocomplete combobox in javafx 2.x using modern .fxml and controller.java as this one is made

http://blog.ngopal.com.np/2011/07/04/autofill-textbox-with-filtermode-in-javafx-2-0-custom-control/

above mentioned demo is messy and hard to configure and be independant (requires some jars)


回答1:


Ensemlbe -- a sample included into the standard set has similar control. It's opensourced, so you can download it and take a look into sources:

http://www.oracle.com/technetwork/java/javase/overview/javafx-samples-2158687.html

take a look at SearchBox.java




回答2:


May be i am late but the link that you posted is now already compatible with the FXML as well just add

to your fxml and also add the import directive in fxml.

Test Source Code is in Github: https://github.com/privatejava/javafx-autocomplete-field/blob/master/src/test/FXML.fxml#L12



来源:https://stackoverflow.com/questions/12927504/how-to-make-an-autocomplete-combobox-in-javafx-2-x-using-modern-fxml-and-contro

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