javaFX add event on resize window code example
Example 1: javafx event resize
Stage stage = new Stage();
stage.widthProperty().addListener((obs, oldVal, newVal) -> {
//on change width
});
stage.heightProperty().addListener((obs, oldVal, newVal) -> {
//on change height
});
Example 2: javafx window resize to screen
primaryStage.setMaximized(true);