问题
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