0

I want a Pane that has an ImageView. When i resize the widow with my mouse, i want the ImageView also to grow or shrink.

Im only allowed to use SceneBuilder.

For some reason i just cant get it wo work. I was tweaking setting for about 4 hours, using different panes, different solutions, different options. It just dont work.

Is there an easy way to get an ImageView resized with the window using SceneBuilder ? It does not matter if i use a AnchorPane or Vbox or whatever as Parent.

Zude
  • 1
  • 1
    To make an `ImageView` responsive like that will require some work in code (or possibly manual editing of the FXML file). Another option is to use a background image. See https://stackoverflow.com/q/58476162/6395627 and https://stackoverflow.com/q/12630296/6395627 (I would avoid binding the fit width/height properties to the dimensions of an ancestor). – Slaw Dec 22 '19 at 19:10
  • Not sure if SceneBuilder allows expression bindings by now. If it doesn't you could create a fxml that does this, but not with SceneBuilder. – fabian Dec 23 '19 at 00:48
  • Are you allowed to specify a controller in `fxml` ? – c0der Dec 23 '19 at 08:42

0 Answers0