xxxxxxxxxx
public class JavaFXApplication2 extends Application {
@Override
public void start(Stage stage) throws Exception {
// resource/same.package.add-view.fxml need to be created
// New -> FXML file
FXMLLoader fxmlLoader = new FXMLLoader(JavaFXApplication2.class.getResource("FXMLDocument.fxml"));
Parent root = (Parent) fxmlLoader.load();
// controller = fxmlLoader.getController();
Scene scene = new Scene(root);
// set up the stage
stage.setTitle("Add Students");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) throws IOException {
launch();
}
}