📅  最后修改于: 2022-03-11 14:52:48.148000             🧑  作者: Mango
scene.widthProperty().addListener(new ChangeListener() {
@Override public void changed(ObservableValue extends Number> observableValue, Number oldSceneWidth, Number newSceneWidth) {
System.out.println("Width: " + newSceneWidth);
}
});
scene.heightProperty().addListener(new ChangeListener() {
@Override public void changed(ObservableValue extends Number> observableValue, Number oldSceneHeight, Number newSceneHeight) {
System.out.println("Height: " + newSceneHeight);
}
});