Newer
Older
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
/**
* Class <b>App</b> - extends class Application and it is an entry point of the program
* @author Java I
*/
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
try {
//Construct a main window with a canvas.
FXMLLoader loader = new FXMLLoader(this.getClass().getResource("GameView.fxml"));
BorderPane root = loader.load();
primaryStage.setScene(scene);
primaryStage.resizableProperty().set(false);
//Exit program when main window is closed
primaryStage.setOnCloseRequest(this::exitProgram);