I am using the standard JavaFX preloader templete. But I am not sure how to link it to my JavaFX program.
public class FXPreloader extends Preloader {
ProgressBar bar;
Stage stage;
.......
}
And here is my Main
public class CIDCV extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Main.fxml"));
Controller.stage=primaryStage;
Scene scene = new Scene(root);
Controller.stage.setScene(scene);
Controller.stage.setResizable(false);
Controller.stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
All what I am looking for is a splash screen to indicate the program is starting.