1FXMLLoader loader = new FXMLLoader();
2loader.setLocation(Main.class.getResource("Path/To/file.fxml"));
3root = loader.load();
4
5Scene scene = new Scene(root, width, height);
6primaryStage.setScene(scene);
7
8primaryStage.setTitle("Title");
9primaryStage.show();