As i see in
In SceneBuilder drag the
graphic node you want to use (in this case
ImageView) from the Library to the
Button in the Hierarchy view. Drop it there and you should see the
graphic node displayed as a child of the
This will result in a fxml like this
... <Button mnemonicParsing="false" text="Button"> <graphic> <ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" /> </graphic> </Button> ...
By using the gear button next to the image property of the
ImageView you can specify a image url starting with
@ by selecting Switch to document relative path. Input
image.png for the url
@image.png. Saving the fxml to the correct location relative to the image will display the image in SceneBuilder.