use of eu.tn.controller.FirstScreenController in project TNCY-English-Project by mrngg.
the class Main method start.
@Override
public void start(Stage primaryStage) throws Exception {
File db = new File("src/eu/tn/data/tests.txt");
File db2 = new File("src/eu/tn/data/rules.txt");
if (db.exists()) {
new Database().loadTests();
}
if (db2.exists()) {
new Database().loadRules();
}
BorderPane root = new BorderPane();
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("view/FirstScreen.fxml"));
loader.setControllerFactory((iC -> new FirstScreenController()));
root.setCenter(loader.load());
primaryStage.setOnCloseRequest(event -> {
Platform.exit();
});
primaryStage.setTitle("Shakespeare");
primaryStage.setScene(new Scene(root, 800, 500));
primaryStage.show();
}
Aggregations