// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package demo;

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

public class TrueJavaFXGUIwithExtJS extends Application {
    private Calculator data = new Calculator();
    @Override
    public void start(Stage stg) throws Exception {
        stg.setTitle("True JavaFX GUI with external JavaScript");
        Scene scn = new Scene((Parent) FXMLLoader.load(getClass().getResource("JavaFXGUIwithExtJS.fxml")));
        scn.getStylesheets().add(getClass().getResource("JavaFXGUI.css").toString());
        stg.setScene(scn);
        stg.show();
    }
    public Calculator getData() {
        return data;
    }
    public static void main(String[] args) {
        Application.launch(TrueJavaFXGUIwithExtJS.class, args);
    }
}
