示例#1
0
  public void showModpackOverview() {
    TRLauncher.log.info("Showing modpack overview");
    try {
      FXMLLoader loader = new FXMLLoader();
      loader.setLocation(TRLauncher.class.getResource("view/overview/ModpackOverview.fxml"));

      AnchorPane modpackOverview = loader.load();

      rootLayout.setCenter(modpackOverview);

      ModpackOverviewController controller = loader.getController();
      controller.setPrimaryStage(primaryStage);
    } catch (IOException e) {
      TRLauncher.log.error("Couldn't find the specified layout");
      Issues.create(null, e);
    }
  }
示例#2
0
  public void showModpackOverview() {
    System.out.println("Showing modpack overview");
    try {
      FXMLLoader loader = new FXMLLoader();
      loader.setLocation(TRLauncher.class.getResource("view/overview/ModpackOverview.fxml"));

      AnchorPane modpackOverview = loader.load();

      rootLayout.setCenter(modpackOverview);

      ModpackOverviewController controller = loader.getController();
      controller.setPrimaryStage(primaryStage);
    } catch (IOException e) {
      System.err.println("Couldn't find the specified layout");
      e.printStackTrace();
    }
  }