📅  最后修改于: 2022-03-11 14:52:34.850000             🧑  作者: Mango
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Main.class.getResource("Path/To/file.fxml"));
root = loader.load();
Scene scene = new Scene(root, width, height);
primaryStage.setScene(scene);
primaryStage.setTitle("Title");
primaryStage.show();