In the Projects window, find sunago.fxml, right-click on it, and select Edit. We'll make this user interface change by hand, only for the sake of experience. Scroll down until you find the closing Menubar tag (</Menubar>). On the line right after that, insert these lines:
<ToolBar > <items> <Button fx:id="refreshButton" /> <Button fx:id="settingsButton" /> </items> </ToolBar>
In SunagoController, we need to add the instance variables as follows:
@FXML private Button refreshButton; @FXML private Button settingsButton;
Then, in initialize(), we need to set them up like this:
refreshButton.setGraphic(getButtonImage("/images/reload.png")); refreshButton.setOnAction(ae -> loadItemsFromNetworks()); refreshButton.setTooltip(new ...