src/main/java/chalmers/pimp/controller/ControllerUtils.java
public static void makeController(Node node, URL url) {
    Objects.requireNonNull(node, "Null node!");
    Objects.requireNonNull(url, "Null URL!");
    try {
      FXMLLoader loader = new FXMLLoader(url);
      loader.setRoot(node);
      loader.setController(node);
      loader.load();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
/**
   * Makes the supplied node the model for the specified FXML-file.
   *
   * @param node the node instance that will made the model for the FXML-file.
   * @param url  the path of the FXML-file.
   * @throws NullPointerException if any arguments are {@code null}.
   */
Makes the supplied node the model for the specified FXML-file.
@param node the node instance that will made the model for the FXML-file.
@param url  the path of the FXML-file.
@throws NullPointerException if any arguments are  null.
Makes the supplied node the model for the specified FXML - file . @param node the node instance that will made the model for the FXML - file . @param url the path of the FXML - file . @throws NullPointerException if any arguments are null .
public static void makeController(Node node, URL url) {
    Objects.requireNonNull(node, "Null node!");
    Objects.requireNonNull(url, "Null URL!");
    try {
      FXMLLoader loader = new FXMLLoader(url);
      loader.setRoot(node);
      loader.setController(node);
      loader.load();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
public static void makeController ( Node node , URL url ) { Objects . requireNonNull ( node , "Null node!" ) ; Objects . requireNonNull ( url , "Null URL!" ) ; try { FXMLLoader loader = new FXMLLoader ( url ) ; loader . setRoot ( node ) ; loader . setController ( node ) ; loader . load ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Makes the supplied node the model for the specified FXML-file.
Makes the supplied node the model for the specified FXML - file .