I've tried:
<BorderPane fx:id="bottomContentPane">
<Button fx:id="preferencesButton" text="Preferences" graphic="@icons/gear.png" />
</BorderPane>
but I get
Caused by: java.lang.IllegalArgumentException: Unable to coerce file:/C:/work/JavaFXTest/build/classes/resource/icons/gear.png to class javafx.scene.Node.
at com.sun.javafx.fxml.BeanAdapter.coerce(Unknown Source)
at com.sun.javafx.fxml.BeanAdapter.put(Unknown Source)
at com.sun.javafx.fxml.BeanAdapter.put(Unknown Source)
at javafx.fxml.FXMLLoader$Element.applyProperty(Unknown Source)
at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(Unknown Source)
at javafx.fxml.FXMLLoader$Element.processEndElement(Unknown Source)
I checked and the file does exist.
Edited by: user8790487 on Dec 12, 2011 9:22 AM
code tags
Edited by: user8790487 on Dec 12, 2011 10:23 AM