I am using scene builder to create my GUI and I am displaying Image
s as users select items in a list. The Image
s are of different sizes and when an Image
that is smaller than the pane it is in, the image is displayed in the top left of the pane. How do I go about getting the ImageView
and/or Image
to be displayed in the center of the Pane
?
I've looked throughout the javafx imageview and image APIs but I haven't found much on centering the ImageView
in a Pane
. I haven't seen anything in scene builder, either. Usually in scene builder, if there is a way to center a node, there will be an option for centering.