added App app to app.
This commit is contained in:
@@ -15,6 +15,7 @@ import java.io.IOException;
|
||||
|
||||
public class App extends Application {
|
||||
private static Stage stage;
|
||||
private static App app;
|
||||
|
||||
/**
|
||||
* Entry point for running the programme
|
||||
@@ -31,6 +32,8 @@ public class App extends Application {
|
||||
* @throws Exception if something wrong with title screen.
|
||||
*/
|
||||
public void start(Stage stage) throws Exception {
|
||||
App.stage = stage;
|
||||
App.app = this;
|
||||
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
|
||||
@Override
|
||||
public void handle(WindowEvent event) {
|
||||
@@ -38,7 +41,7 @@ public class App extends Application {
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
App.stage = stage;
|
||||
|
||||
loadStart(App.stage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user