【发布时间】:2016-09-14 06:56:50
【问题描述】:
我目前正在使用类似的东西将此代码绑定到 fxml javafx 按钮
Parent parent = FXMLLoader.load(getClass().getResource("AolRun.fxml"));
Stage stage = new Stage();
stage.initStyle(StageStyle.UTILITY);
stage = (Stage) run.getScene().getWindow();
Scene scene = new Scene(parent);
stage.setScene(scene);
scene.getStylesheets().add("/css/Style.css");
stage.setTitle("Output");
stage.setResizable(false);
stage.show();
是否有一个通用函数可以用于返回,它只是将屏幕从当前 fxml 场景转换到下一个 fxml。
每个 fxml 都有单独的场景。
【问题讨论】:
-
最好使用一个Scene,只改变Scene的父布局。
-
我已经构建了我的应用程序有什么选择
标签: javafx