You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
package visualiser.app;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.application.Platform;
|
|
import javafx.event.EventHandler;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.stage.Stage;
|
|
import javafx.stage.WindowEvent;
|
|
|
|
public class App extends Application {
|
|
|
|
/**
|
|
* Entry point for running the programme
|
|
*
|
|
* @param args for starting the programme
|
|
*/
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
|
|
public void start(Stage stage) throws Exception {
|
|
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
|
|
@Override
|
|
public void handle(WindowEvent event) {
|
|
Platform.exit();
|
|
System.exit(0);
|
|
}
|
|
});
|
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/visualiser/scenes/main.fxml"));
|
|
Parent root = loader.load();
|
|
Scene scene = new Scene(root, 1200, 800);
|
|
stage.setScene(scene);
|
|
stage.setTitle("RaceVision - Team 7");
|
|
stage.show();
|
|
}
|
|
}
|