I have the following structure:
BorderPane (which fills the Scene/Stage)
+-StackPane (center)
+- BorderPane
+- Group (center)
+- ImageView
+- ImageView
+- other content
I use this code to create a backdrop for my "other content". It has two ImageViews so I can fade from one image to another, but the same problem occurs with just one ImageView.
My problem is, no matter what I do, if the Image associated with the ImageView is larger than my Stage, it will just adjust all the parents to be larger than allowed. The only thing I can do to prevent it is to hard code the size of the ImageView using the fitWidth/fitHeight properties, however, I donot know exactly how big these should be as it depends on the screen size and on things like borders (which may be css styled) of all the parents.
I put a BorderPane around my ImageView and put them in the center spot in the hope it will force them to take up all the available space... but not more.
I simply donot want the size of the ImageView to have ANY influence on the parent containing it.
Any ideas what I can try?
Edited by: john16384 on Dec 7, 2011 3:57 AM