-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTrainingApp.java
More file actions
38 lines (30 loc) · 1.09 KB
/
TrainingApp.java
File metadata and controls
38 lines (30 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package databaser.ui;
import databaser.ui.controllers.MainMenuController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.net.URL;
public class TrainingApp extends Application {
public static final int WIDTH = 660;
public static final int HEIGHT = 900;
public static final String appName = "Train-n-Gain";
public static Stage primaryStage;
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
TrainingApp.primaryStage = primaryStage;
URL resource = getClass().getResource(Page.MAIN_MENU.fxmlPath());
FXMLLoader loader = new FXMLLoader();
loader.setLocation(resource);
Parent root = loader.load();
MainMenuController controller = loader.getController();
primaryStage.setTitle(Page.MAIN_MENU.title());
Scene scene = new Scene(root, WIDTH, HEIGHT);
primaryStage.setScene(scene);
primaryStage.show();
}
}