Fetch/javatui/controller/App.java

36 lines
768 B
Java
Raw Normal View History

2019-03-26 03:10:22 +00:00
package controller;
2019-03-26 21:54:37 +00:00
import events.*;
2019-03-26 03:10:22 +00:00
import javafx.application.Application;
import javafx.scene.Scene;
2019-03-26 21:54:37 +00:00
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.HBox;
2019-03-26 03:10:22 +00:00
import javafx.stage.Stage;
public final class App extends Application {
2019-03-26 21:54:37 +00:00
public static final HBox root = new HBox();
public static final Scene scene = new Scene(root);
2019-03-26 03:10:22 +00:00
@Override
public void init() {
2019-03-26 21:54:37 +00:00
// Put more init stuff here if need be.
System.out.println("Initialization Completed");
2019-03-26 03:10:22 +00:00
}
@Override
public void start(Stage stage) {
2019-03-26 21:54:37 +00:00
// There's got to be a cleaner way..
scene.addEventFilter(KeyEvent.KEY_PRESSED, new WidgetAdd());
2019-03-26 03:10:22 +00:00
stage.setTitle("JavaTUI");
stage.setScene(scene);
stage.show();
}
2019-03-26 21:54:37 +00:00
2019-03-26 03:10:22 +00:00
}