Stage stage = new Stage(); stage.widthProperty().addListener((obs, oldVal, newVal) -> { //on change width }); stage.heightProperty().addListener((obs, oldVal, newVal) -> { //on change height });
stage.widthProperty().addListener((obs, oldVal, newVal) -> { // Do whatever you want }); stage.heightProperty().addListener((obs, oldVal, newVal) -> { // Do whatever you want });