-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainApp.java
More file actions
executable file
·35 lines (25 loc) · 1 KB
/
MainApp.java
File metadata and controls
executable file
·35 lines (25 loc) · 1 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
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.stage.Stage;
import scenes.HomePage;
public class MainApp extends Application {
@Override
public void start(Stage primaryStage) {
HomePage homePage = new HomePage();
Image icon = new Image(getClass().getResourceAsStream("./images/AcademiX-Icon.png"));
Font.loadFont(getClass().getResourceAsStream("./fonts/Poppins-Regular.ttf"),14);
Scene initialScene = homePage.getScene(primaryStage);
initialScene.setFill(Color.web("#121212"));
primaryStage.setScene(initialScene);
primaryStage.setTitle("AcademiX | Welcome!");
primaryStage.getIcons().add(icon);
primaryStage.setResizable(false);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}