// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package booking;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class JavaFXGui extends Application {
    @Override
    public void start(Stage stg) throws Exception {
        stg.setTitle("Booking System");
        FXMLLoader loader = new FXMLLoader(getClass().getResource("MainForm.fxml"));
        Scene scn = new Scene((Parent)loader.load());
        stg.setScene(scn);
        stg.show();
        ((MainForm)loader.getController()).setCloseHandler(stg);
    }
    public static void main(String[] args) {
        Application.launch(JavaFXGui.class, args);
    }
}
