-
Notifications
You must be signed in to change notification settings - Fork 3
/
GUIMain.java
39 lines (34 loc) · 1.01 KB
/
GUIMain.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
package gui;
import java.io.IOException;
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;
/**
* GUIMain
*
* @author Abdelrahman Bayoumi
*/
public class GUIMain extends Application {
@Override
public void start(Stage stage) {
try {
Parent root = FXMLLoader.load(getClass().getResource("FXML.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.initStyle(StageStyle.UNDECORATED);
stage.setTitle("CPU Scheduler Simulator");
stage.getIcons().add(new Image(getClass().getResourceAsStream("icon.png")));
stage.show();
} catch (IOException e) {
System.out.println("Exception in GUIMain -> Start Method:-" + e);
System.exit(0);
}
}
public static void main(String[] args) {
launch(args);
}
}