📜  javafx 应用程序 fxml - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:34.850000             🧑  作者: Mango

代码示例1
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();