Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Code For A Resizable ImageView

Nidhinesh Nand edited this page Aug 11, 2019 · 2 revisions
VBox vbox = new VBox();
StackPane sp = new StackPane();
sp.getChildren().add(imageView);
stage.setTitle("Loading an image");

vbox.getChildren().add(sp);
VBox.setVgrow(sp, Priority.ALWAYS);
imageView.fitHeightProperty().bind(stage.heightProperty());
imageView.fitWidthProperty().bind(stage.widthProperty());