-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChessMasterMain.java
More file actions
44 lines (41 loc) · 1023 Bytes
/
Copy pathChessMasterMain.java
File metadata and controls
44 lines (41 loc) · 1023 Bytes
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
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.Parent;
import javafx.fxml.FXMLLoader;
import java.io.IOException;
import javafx.scene.layout.AnchorPane;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import java.util.Timer;
public class ChessMasterMain extends Application
{
public void start(Stage stage)
{
try
{
FXMLLoader loader = new FXMLLoader(getClass().getResource("ChessMasterFXML.fxml"));
Parent root = loader.load();
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setTitle("Chess Master");
stage.setResizable(false);
stage.show();
}
catch(Exception e)
{
e.printStackTrace();
}
Timer timer = new Timer();
stage.setOnCloseRequest(event ->
{
System.out.println("Stage is closing");
System.exit(0);
}
);
}
public static void main(String[] args)
{
launch(args);
}
}