private void initContentArea() { contentArea = new BorderPane(); AnchorPane p = new AnchorPane(); AnchorPane.setLeftAnchor(contentArea, 0.0); AnchorPane.setRightAnchor(contentArea, 0.0); AnchorPane.setTopAnchor(contentArea, 0.0); AnchorPane.setBottomAnchor(contentArea, 0.0); p.getChildren().add(contentArea); FlingPane flingPanel = new FlingPane(); flingPanel.setFlingDirection(FlingDirection.HORIZONTAL); AnchorPane.setLeftAnchor(flingPanel, 0.0); AnchorPane.setRightAnchor(flingPanel, 0.0); AnchorPane.setTopAnchor(flingPanel, 0.0); final HBox itemsPanel = new HBox(); itemsPanel.getStyleClass().add("advanced-tab-item-panel"); flingPanel.setContent(itemsPanel); items.addListener( new ListChangeListener<AdvancedStackItem>() { @Override public void onChanged( javafx.collections.ListChangeListener.Change<? extends AdvancedStackItem> c) { while (c.next()) { if (c.wasPermutated()) { } else { if (c.wasRemoved()) {} if (c.wasAdded()) { for (AdvancedStackItem i : c.getAddedSubList()) { Label l = new Label(null, new ImageView(i.getIconDescriptorProperty().getImage())); itemsPanel.getChildren().add(l); l.getStyleClass().add("advanced-tab-item"); EventHandler<MouseEvent> h = new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { if (event.isStillSincePress()) {} } }; itemsPanel.setOnMouseClicked(h); } } } } } }); p.getChildren().add(flingPanel); container.setCenter(p); }
@Override protected BorderPane getPane() { BorderPane pane = new BorderPane(); GridPane paneFullTime = new GridPane(); paneFullTime.setAlignment(Pos.CENTER); paneFullTime.setPadding(new Insets(11, 12, 13, 14)); paneFullTime.setHgap(5.5); paneFullTime.setVgap(5.5); paneFullTime.add(text, 0, 0); paneFullTime.add(tfSSN, 1, 0); paneFullTime.add(arrNonCreditChBox[0], 0, 2); paneFullTime.add(arrNonCreditChBox[1], 0, 3); paneFullTime.add(arrNonCreditChBox[2], 0, 4); paneFullTime.add(submitBt, 1, 5); pane.setCenter(paneFullTime); submitBt.setOnAction( e -> { checkingRequirements(); connectToDB(); submitToDB(); pane.setCenter(new Congratulation().getPane()); }); return pane; }
/** @param fp */ private void makeDialog(FlowPane fp) { Separator sp = new Separator(); // LOGO logoChildBP.setCenter(logo); // LBL TXT lblText = new Text(LBLTXT); Font mFont = Font.font("Dialog", FontPosture.ITALIC, 0xf); lblText.setFont(mFont); lblText.setFill(Color.BLUEVIOLET); lblText.setWrappingWidth(0x12c); labelChildBP.setCenter(lblText); // ---------------------------------------------------------------------- addItems(fp); // ---------------------------------------------------------------------- this.addButt = new Button("ADD NEW"); this.addButt.setDefaultButton(true); this.addButt.setAlignment(Pos.TOP_RIGHT); this.addButt.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { addNewItemsDialog(); primaryStage.close(); } }); fp.getChildren().add(addButt); }
public void setSimpleOverlay(Parent content) { BorderPane con = new BorderPane(); BorderPane background = new BorderPane(content); BorderPane.setMargin(background, new Insets(50)); background.setStyle("-fx-background-color: rgba(41, 41, 41, 0);"); contentPane.setEffect(new BoxBlur()); con.setCenter(background); con.setPickOnBounds(true); overlayPane.setCenter(con); }
public boolean isOkPressed(int typeSignal) { ((StageLoader) btnOK.getScene().getWindow()).setMethod(() -> btnOK()); if (tuSignal == null) return false; Stage w = (Stage) btnOK.getScene().getWindow(); if (typeSignal == 3) { List<SpTuCommand> tuCommands = SingleFromDB.spTuCommands .stream() .filter(f -> f.getObjref() == tuSignal.getStateref()) .collect(Collectors.toList()); ChoiceBox<SpTuCommand> chBox = new ChoiceBox<>(); tuCommands.forEach(chBox.getItems()::add); chBox .getSelectionModel() .selectedItemProperty() .addListener( (observ, oldValue, newValue) -> { value = newValue.getVal() + ""; }); if (chBox.getItems().size() > 0) chBox.getSelectionModel().selectFirst(); if (SingleObject.selectedShape.getValueProp().get() == chBox.getSelectionModel().getSelectedItem().getVal()) { chBox.getSelectionModel().selectNext(); } Platform.runLater(() -> chBox.requestFocus()); bpTU.setCenter(chBox); } else if (typeSignal == 1) { TextField txtField = new TextField(); txtField.setText(SingleObject.selectedShape.getValueProp().get() + ""); txtField .textProperty() .addListener( (observ, oldValue, newValue) -> { try { Double.parseDouble(newValue); value = newValue; } catch (Exception e) { txtField.setText(oldValue); } }); Platform.runLater(() -> txtField.requestFocus()); bpTU.setCenter(txtField); } else { System.out.println("===== This is not TU or TI ====="); } w.showAndWait(); return isOkClicked; }
@Override public void start(Stage primaryStage) throws Exception { BorderPane outerPane = new BorderPane(); HBox topBox = new HBox(20); HBox bottomBox = new HBox(20); outerPane.setCenter(newText); fontChoice.setValue("Times New Roman"); sizeChoice.setValue(12); topBox.setPadding(new Insets(20, 20, 20, 20)); bottomBox.setPadding(new Insets(20, 20, 20, 20)); List<String> items = Font.getFamilies(); fontChoice.getItems().addAll(items); for (int i = 1; i <= 100; i++) sizeChoice.getItems().add(i); topBox.getChildren().addAll(fontName, fontChoice, fontSize, sizeChoice); bottomBox.getChildren().addAll(bold, italic); topBox.setAlignment(Pos.CENTER); bottomBox.setAlignment(Pos.CENTER); outerPane.setTop(topBox); outerPane.setCenter(newText); outerPane.setBottom(bottomBox); fontChoice.setOnAction( e -> { setFont(); }); sizeChoice.setOnAction( e -> { setFont(); }); bold.setOnAction( e -> { setFont(); }); italic.setOnAction( e -> { setFont(); }); Scene scene = new Scene(outerPane, X, Y); primaryStage.setScene(scene); primaryStage.show(); }
public TelaAux(String mensagem) { this.mensagem = mensagem; BorderPane root = new BorderPane(); Scene scene = new Scene(root, 450, 80, Color.LIGHTGRAY); VBox boxtexto = new VBox(10); Label texto = new Label(getMensagem()); Button ok = new Button("OK"); ok.setStyle("-fx-cursor: hand;"); boxtexto.getChildren().addAll(texto, ok); boxtexto.setAlignment(Pos.CENTER); root.setCenter(boxtexto); texto.setFont(new Font(15)); setScene(scene); setOpacity(0.9); initModality( Modality.APPLICATION_MODAL); // Responsável por só ser possível voltar ao sg ong se fechar a // janela. show(); ok.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent arg0) { close(); } }); }
@Override public void createPartControl(Composite container) { Platform.setImplicitExit(false); // Keep the JavaFX thread running // Creating a JavaFX Browser, so create an FXCanvas to contain it FXCanvas canvas = new FXCanvas(container, SWT.NONE); BorderPane borderPane = new BorderPane(); Scene scene = new Scene(borderPane); WebView browser = new WebView(); webEngine = browser.getEngine(); webEngine.load(homeLocation); borderPane.setCenter(browser); canvas.setScene(scene); IActionBars actionBars = getIntroSite().getActionBars(); IToolBarManager toolBar = actionBars.getToolBarManager(); setupToolbarButtons(toolBar); lockUrl(); addJSBridges(); }
/** DEFAULT. */ public CafePricingDialog() { this.priceMap = new HashMap<>(); this.primaryStage = new Stage(); this.root = new Group(); this.scrollPane = new ScrollPane(); this.scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); this.scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); this.scene = new Scene(scrollPane, 0x190, 0x1f4, Color.LIGHTGREY); makeDialog(fp); fp.setMinSize(380, 480); fp.setAlignment(Pos.TOP_CENTER); bp.setTop(logoChildBP); bp.setCenter(labelChildBP); bp.setBottom(fp); root.getChildren().add(bp); scrollPane.setContent(root); // -------------------------------------------- this.primaryStage.setTitle(TITLE); this.primaryStage.setScene(scene); this.primaryStage.setResizable(false); this.primaryStage.show(); }
@Inject public PersonListPart(BorderPane parent, final MApplication application) { ListView<Person> view = new ListView<Person>(); view.setCellFactory( new Callback<ListView<Person>, ListCell<Person>>() { public ListCell<Person> call(ListView<Person> arg0) { return new PersonCell(); } }); view.setId("detail-list"); view.getItems().addAll(createList()); view.getSelectionModel() .selectedItemProperty() .addListener( new ChangeListener<Person>() { public void changed( ObservableValue<? extends Person> arg0, Person arg1, Person arg2) { // System.err.println("new value: " + arg2); // System.err.println(application.getContext().hashCode()); application.getContext().set(Person.class, arg2); } }); parent.setCenter(view); }
private Scene createMainTetrisScene() { mainPane = new BorderPane(); VBox mainBox = new VBox(); mainBox.setPadding(new Insets(200, 0, 0, 20)); mainBox.getChildren().add(mainGrid); mainGrid.setOnKeyPressed(new KeyboardHandler()); mainPane.setBottom(mainBox); mainPane.setTop(createActionPane()); mainPane.setRight(createStatePane()); Group group = new Group(); for (int i = 19; i >= 0; i--) { for (int j = 0; j < 10; j++) { Image img; if (mainGrid.getColor(i, j) != Color.DARKGRAY) { img = new Image(getClass().getResourceAsStream("RED.png")); } else { img = new Image(getClass().getResourceAsStream("EMPTY.png")); } ImageView iView = new ImageView(img); iView.setX(j * 17); iView.setY(i * 16); iView.setOpacity(1); iView.setPreserveRatio(true); group.getChildren().addAll(iView); } } Scene scene = new Scene(group, 600, 600); mainPane.setCenter(group); return new Scene(mainPane, 380, 540); // 540 }
@Override public void start(Stage stage) throws Exception { stage.setTitle("Script Creator"); // Center events = new VBox(); eventsScrollPane = new ScrollPane(); eventsScrollPane.setVbarPolicy(ScrollBarPolicy.ALWAYS); eventsScrollPane.setContent(events); // Left VBox left = new VBox(); Button record = new Button("Record"), add = new Button("Add"); CheckBox recordWheel = new CheckBox("Wheel"), recordMouseMovements = new CheckBox("Movement"), recordTime = new CheckBox("Time"); add.setOnAction(e -> events.getChildren().add(new EditableLabel())); left.getChildren().addAll(add, record, recordWheel, recordTime, recordMouseMovements); // Bottom // Container BorderPane mainLayout = new BorderPane(); mainLayout.setCenter(eventsScrollPane); mainLayout.setLeft(left); main = new Scene(mainLayout, 300, 250); stage.setScene(main); stage.show(); }
private void updateChildren(boolean useButtons) { hboxLayout.getChildren().clear(); hboxLayout.getChildren().addAll(createChildren(useButtons)); vboxLayout.getChildren().clear(); vboxLayout.getChildren().addAll(createChildren(useButtons)); flowLayout.getChildren().clear(); flowLayout.getChildren().addAll(createChildren(useButtons)); List<Node> contents1 = createChildren(useButtons); gridLayout.getChildren().clear(); gridLayout.add(contents1.get(0), 0, 0); gridLayout.add(contents1.get(1), 1, 0); gridLayout.add(contents1.get(2), 0, 1, 2, 1); List<Node> contents = createChildren(useButtons); borderLayout.getChildren().clear(); borderLayout.setLeft(contents.get(0)); borderLayout.setTop(contents.get(1)); borderLayout.setRight(contents.get(2)); borderLayout.setBottom(contents.get(3)); borderLayout.setCenter(contents.get(4)); stackLayout.getChildren().clear(); stackLayout.getChildren().addAll(createChildren(useButtons)); tileLayout.getChildren().clear(); tileLayout.getChildren().addAll(createChildren(useButtons)); }
// REMOVE ME public static Node createIconContent() { StackPane sp = new StackPane(); BorderPane borderPane = new BorderPane(); Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY); rectangle.setStroke(Color.BLACK); borderPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight()); Rectangle recTop = new Rectangle(62, 5, Color.web("#349b00")); recTop.setStroke(Color.BLACK); Rectangle recBottom = new Rectangle(62, 14, Color.web("#349b00")); recBottom.setStroke(Color.BLACK); Rectangle recLeft = new Rectangle(20, 41, Color.TRANSPARENT); recLeft.setStroke(Color.BLACK); Rectangle recRight = new Rectangle(20, 41, Color.TRANSPARENT); recRight.setStroke(Color.BLACK); Rectangle centerRight = new Rectangle(20, 41, Color.TRANSPARENT); centerRight.setStroke(Color.BLACK); borderPane.setRight(recRight); borderPane.setTop(recTop); borderPane.setLeft(recLeft); borderPane.setBottom(recBottom); borderPane.setCenter(centerRight); sp.getChildren().addAll(rectangle, borderPane); return new Group(sp); }
@Override public void start(Stage primaryStage) throws Exception { BorderPane root = new BorderPane(); HBox message = new HBox(); userText = new TextField(); userText.setEditable(false); userText.setOnAction( e -> { sendMessage(e.getEventType().toString()); userText.setText(""); }); message.getChildren().add(userText); message.setAlignment(Pos.CENTER); message.setPadding(new Insets(10)); chatWindow = new TextArea(); chatWindow.setPrefSize(300, 150); chatWindow.setVisible(true); root.setCenter(chatWindow); root.setBottom(message); startRunning(); primaryStage.setTitle("Instant Messenger"); primaryStage.setScene(new Scene(root, 300, 275)); primaryStage.show(); }
public void initialize() throws IOException { lblMessage.setText(""); lblMessage.setText("Send Oil Change Reminder Message?"); btnCancelMessage.setOnAction( e -> { // System.exit(0); Stage stageBox = (Stage) btnCancelMessage.getScene().getWindow(); stageBox.close(); }); btnSendMessage.setOnAction( e -> { lblMessage.setText(""); lblMessage.setText("Message Sent!"); try { btnCancelMessage.setAlignment(Pos.CENTER); btnSendMessage.setVisible(false); btnCancelMessage.setText("Done!"); Parent stageBox = btnCancelMessage.getParent(); ((BorderPane) stageBox).setCenter(btnCancelMessage); } catch (Exception exception) { } }); }
/** * Sets up the OverlayMenu with all buttons from the existing table view. * * @param tableView The table view to put on the overlay menu. * @return A {@link BorderPane} containing the full menu. */ private BorderPane setUpMenu(TableView<FilterInput> tableView) { final Button addButton = setAddButton(); final Button removeButton = setRemoveButton(tableView); final Button editButton = setEditButton(tableView); final Button selectionButton = setSelectionButton(); // Set up components on overlay final BorderPane borderPane = new BorderPane(); borderPane.setCenter(tableView); tableView.setMinHeight(300); AnchorPane anchorPane = new AnchorPane(); anchorPane.getChildren().addAll(addButton, removeButton, editButton, selectionButton); borderPane.setBottom(anchorPane); AnchorPane.setBottomAnchor(addButton, 0d); AnchorPane.setRightAnchor(addButton, 0d); AnchorPane.setBottomAnchor(removeButton, 0d); AnchorPane.setRightAnchor(removeButton, 30d); AnchorPane.setBottomAnchor(editButton, 0d); AnchorPane.setRightAnchor(editButton, 60d); AnchorPane.setBottomAnchor(selectionButton, 0d); AnchorPane.setRightAnchor(selectionButton, 95d); return borderPane; }
private void createMasterPane() { webView = new WebView(); webViewAnchorPane = new AnchorPane(webView); AnchorPane.setBottomAnchor(webView, 0.0); AnchorPane.setTopAnchor(webView, 0.0); AnchorPane.setLeftAnchor(webView, 0.0); AnchorPane.setRightAnchor(webView, 0.0); webEngine = webView.getEngine(); dialog = Dialogs.create().lightweight().modal().owner(webView); // locals = new LocalJSObject(webEngine); // globals = GlobalJSObject.getGlobalJSObject(webEngine); javaScriptHelpers = new BurpKitBridge(webEngine); originalUserAgent = webEngine.getUserAgent(); webEngine.setJavaScriptEnabled(true); webEngine.setOnAlert(this::handleAlert); webEngine.setOnError(this::handleError); webEngine.setConfirmHandler(param -> true); webEngine.getLoadWorker().stateProperty().addListener(this::workerStateChanged); createToolBar(); createStatusBar(); webEngine.load("about:blank"); masterPane = new BorderPane(); masterPane.setTop(toolBar); masterPane.setCenter(webViewAnchorPane); masterPane.setBottom(statusBar); }
public void displayPane() throws IOException { addStationsToCB(); paneTop.getColumnConstraints().add(new ColumnConstraints(60)); paneTop.getColumnConstraints().add(new ColumnConstraints(200)); paneTop.getColumnConstraints().add(new ColumnConstraints(100)); paneBot.getColumnConstraints().add(new ColumnConstraints(60)); paneBot.getColumnConstraints().add(new ColumnConstraints(200)); paneBot.getColumnConstraints().add(new ColumnConstraints(100)); paneCenter.getColumnConstraints().add(new ColumnConstraints(300)); paneTop.setPadding(new Insets(10, 10, 10, 10)); paneTop.setAlignment(Pos.CENTER); paneTop.setHgap(5); paneTop.setVgap(5); paneBot.setPadding(new Insets(10, 10, 10, 10)); paneBot.setAlignment(Pos.CENTER); paneBot.setHgap(5); paneBot.setVgap(5); paneTop.add(new Label("Station :"), 0, 0); paneTop.add(cbStations, 1, 0); paneTop.add(btOpen, 2, 0); paneBot.add(new Label("Quantity :"), 0, 0); paneBot.add(cbQuantity, 1, 0); paneBot.add(btShow, 2, 0); paneTop.setHalignment(btOpen, HPos.RIGHT); paneBot.setHalignment(btShow, HPos.RIGHT); paneCenter.setHgap(5); paneCenter.setVgap(5); paneCenter.setAlignment(Pos.CENTER); sp.setContent(paneCenter); sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS); bp.setMargin(sp, new Insets(20, 50, 40, 50)); bp.setTop(paneTop); bp.setCenter(sp); bp.setBottom(paneBot); btOpen.setOnAction( e -> { try { open(); } catch (IOException er) { er.printStackTrace(); } }); btShow.setOnAction(e -> showGraph()); }
private void showContentView(String fileName) { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(Main.class.getResource("views/" + fileName)); AnchorPane contentView = (AnchorPane) loader.load(); content.setCenter(contentView); } catch (IOException e) { e.printStackTrace(); } }
public FxScrollPreview() { titleDisplay = new TextField(""); titleDisplay.setEditable(false); titleDisplay.getStyleClass().add("scroll-title"); content = new WebView(); content.getStyleClass().add("scroll-preview-browser"); pane = new BorderPane(); pane.getStyleClass().add("scroll-preview-pane"); pane.setTop(titleDisplay); pane.setCenter(content); }
public static Node createProgressIndicator() { ProgressIndicator indicator = new ProgressIndicator(); indicator.setMaxHeight(350); indicator.setMaxWidth(350); BorderPane borderPane = new BorderPane(); BorderPane.setMargin(indicator, new Insets(5)); borderPane.setCenter(indicator); borderPane.setStyle("-fx-background-color: rgba(230,230,230,0.7);"); return borderPane; }
private void build() { setTitle(TITLE); getStyleClass().add("inventory"); setupActions(); BorderPane pane = new BorderPane(); pane.setCenter(_chart); // buildChart()); pane.setLeft(buildCtrl()); setContent(pane); }
public Scene createLoginScene() { BorderPane borderPane = new BorderPane(); HBox title = createTitle(); GridPane grid = createLoginForm(borderPane); HBox hbox = createSkipLoginBar(); borderPane.setTop(title); borderPane.setCenter(grid); borderPane.setBottom(hbox); Scene scene = new Scene(borderPane, sceneWidth, sceneHeight); return scene; }
public SubExperimentListCell() { BorderPane.setMargin(progressRect, new Insets(2)); BorderPane.setMargin(progressRect, new Insets(2, 0, 0, 0)); BorderPane.setAlignment(label, Pos.BOTTOM_LEFT); progressRect.setMaxWidth(Integer.MAX_VALUE); progressRect.setPrefHeight(3); progressRect.setMinHeight(3); progressRect.getStyleClass().add("mini-progress-bar"); content.setBottom(progressRect); content.setCenter(label); }
/** Creates the album playback view. */ private void display() { scrollPos = 0; songScroller = new ScrollPane(); songScroller.setMinWidth(PaneUtil.WIDTH - GoogleUINaviController.COVER_SIZE - 10); songScroller.setStyle("-fx-background-color:transparent;"); songScroller.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); songBox = new VBox(6); songBox.setPadding(new Insets(3, 2, 2, 2)); int track = 1; for (Song song : album.getSongs()) { HBox trackBox = new HBox(); trackBox.setId(String.valueOf(song.getMID())); trackBox.setAlignment(Pos.BASELINE_LEFT); trackBox.setPadding(new Insets(2, 5, 2, 5)); if (track == 1) { trackBox.setStyle(STYLE_ACTIVE); lastSongSelection = trackBox; } else { trackBox.setStyle(STYLE_INACTIVE); } BorderPane innerTrackBox = new BorderPane(); HBox posBox = new HBox(5); posBox.setMinWidth(40); posBox.getChildren().add(createTrackText(track + ".")); innerTrackBox.setLeft(posBox); HBox nameBox = new HBox(5); nameBox.setMinWidth(385); String name = song.getName(); if (name.endsWith(".mp3")) { name = name.substring(0, name.length() - 4); } nameBox.getChildren().add(createTrackText(" " + name)); innerTrackBox.setCenter(nameBox); innerTrackBox.setRight(createTrackText(song.getDuration())); trackBox.getChildren().add(innerTrackBox); songBox.getChildren().add(trackBox); track++; } songScroller.setOpacity(0); songScroller.setContent(songBox); albumNode.getChildren().add(songScroller); }
private void showWindowEuler() { FXMLLoader loader = new FXMLLoader(); loader.setLocation(MjjMain.class.getResource("javafx/view/WindowEuler.fxml")); try { AnchorPane windowEuler = (AnchorPane) loader.load(); Scene scene = new Scene(windowEuler); rootLayout.setCenter(windowEuler); } catch (IOException e) { e.printStackTrace(); } }
@Override public void start(Stage primaryStage) throws Exception { primaryStage.setTitle("Game of Life"); BorderPane pane = new BorderPane(); GridPane gameZoneGrid = addGameZone(); pane.setCenter(gameZoneGrid); GridPane parameterPane = addParameterPane(); pane.setRight(parameterPane); Scene scene = new Scene(pane, 750, 750); primaryStage.setScene(scene); primaryStage.show(); }
@Override public void start(Stage stage) throws Exception { this.stage = stage; stage.initStyle(StageStyle.UNDECORATED); stage.setTitle("Choosing Hero"); BorderPane pnlMain = new BorderPane(); pnlMain.setTop(header); pnlMain.setCenter(heroPane); pnlMain.setLeft(alliedHeroPane); Scene scene = new Scene(pnlMain, 960, 600); stage.setResizable(false); stage.setScene(scene); scene .getStylesheets() .add(HeroChoosingGUI.class.getResource("/css/HeroChoosingLayout.css").toExternalForm()); stage.show(); }
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); } }