Package javafx.fxml

Examples of javafx.fxml.FXMLLoader.load()


    this.primaryStage.setTitle("jBot");

    try {
      FXMLLoader loader = new FXMLLoader(
          JBot.class.getResource("Main.fxml"));
      rootLayout = (AnchorPane) loader.load();
      Scene scene = new Scene(rootLayout);
      primaryStage.setScene(scene);
      primaryStage.show();
      primaryStage.setResizable(false);   
      scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
View Full Code Here


  }
 
  public void fisher() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Fisher.fxml"));
    AnchorPane aPane = (AnchorPane) loader.load();
    Stage stage = new Stage();
    stage.initStyle(StageStyle.DECORATED);
    Scene scene = new Scene(aPane);
    stage.setScene(scene);
    stage.show();
View Full Code Here

  }

  public void spellCaster() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("SpellCaster.fxml"));
    AnchorPane aPane = (AnchorPane) loader.load();
    Stage stage = new Stage();
    stage.initStyle(StageStyle.DECORATED);
    Scene scene = new Scene(aPane);
    stage.setScene(scene);
    stage.show();
View Full Code Here

  }
 
  public void selectRod() throws IOException, AWTException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Select.fxml"));
    AnchorPane selectDialog = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.TRANSPARENT);
    Scene scene = new Scene(selectDialog);
    stage.setScene(scene);
    stage.setOpacity(0.1);
View Full Code Here

  }
 
  public void selectWater() throws IOException {
    FXMLLoader loader = new FXMLLoader(
        JBot.class.getResource("Select.fxml"));
    AnchorPane selectDialog = (AnchorPane) loader.load();
    final Stage stage = new Stage();
    stage.initStyle(StageStyle.TRANSPARENT);
    Scene scene = new Scene(selectDialog);
    stage.setScene(scene);
    stage.setOpacity(0.1);
View Full Code Here

            FXMLLoader fxmlLoader = new FXMLLoader(new URL(name));
            fxmlLoader.setRoot(n);
            fxmlLoader.setController(n);

            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                try {
                    fxmlLoader.setClassLoader(FXMLLoader.getDefaultClassLoader());
                    fxmlLoader.load();
                } catch (IOException ex) {
View Full Code Here

            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                try {
                    fxmlLoader.setClassLoader(FXMLLoader.getDefaultClassLoader());
                    fxmlLoader.load();
                } catch (IOException ex) {
                    Exceptions.printStackTrace(ex);
                }
            }
        } catch (MalformedURLException ex) {
View Full Code Here

        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("StatusBar.fxml"));
        fxmlLoader.setRoot(this);
        fxmlLoader.setController(this);

        try {
            fxmlLoader.load();
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        }

    }
View Full Code Here

        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MetaDataPane.fxml"));
        fxmlLoader.setRoot(this);
        fxmlLoader.setController(this);

        try {
            fxmlLoader.load();
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        }
    }
View Full Code Here

            FXMLLoader fxmlLoader = new FXMLLoader(new URL(name));
            fxmlLoader.setRoot(n);
            fxmlLoader.setController(n);

            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                try {
                    fxmlLoader.setClassLoader(FXMLLoader.getDefaultClassLoader());
                    fxmlLoader.load();
                } catch (IOException ex) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.