/* * JSR 354 JavaFX Binding Example */ package net.java.javamoney.examples.javafx; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Werner Keil * */ public class BindingApp extends Application { private static final Logger log = LoggerFactory.getLogger(BindingApp.class); public static void main(String[] args) throws Exception { launch(args); } public void start(Stage stage) throws Exception { log.info("Starting Hello JavaFX and Maven demonstration application"); String fxmlFile = "/fxml/hello.fxml"; log.debug("Loading FXML for main view from: {}", fxmlFile); FXMLLoader loader = new FXMLLoader(); Parent rootNode = (Parent) loader.load(getClass().getResourceAsStream(fxmlFile)); log.debug("Showing JFX scene"); Scene scene = new Scene(rootNode, 400, 200); scene.getStylesheets().add("/styles/styles.css"); stage.setTitle("Hello JavaFX and JSR 354"); stage.setScene(scene); stage.show(); } }