-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathProject.java
47 lines (38 loc) · 1.19 KB
/
Project.java
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
39
40
41
42
43
44
45
46
47
package project;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
/**
*
* @author UpToDate
*/
public class Project extends Application {
@Override
public void start(Stage stage) {
try {
// load launcherScene.fxml in layout of type Parent
Parent root = FXMLLoader.load(getClass()
.getResource("launcherScene.fxml"));
// Create obj of type scene , add layout in it
Scene scene = new Scene(root);
stage.initStyle(StageStyle.UNDECORATED);
Image icon = new Image(getClass()
.getResourceAsStream("/img/launcher_icon.png"));
stage.getIcons().add(icon);
stage.setScene(scene);
stage.show();
} catch (Exception ex) {
System.out.println("Launcher Scene Error");
}
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}