package jalviewfx.controllers; import jalviewfx.controllers.engine.ControlledScreen; import jalviewfx.controllers.engine.ScreensController; import jalviewfx.customcomponent.AlertDialog; import java.net.URL; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import application.App.Screens; public class Screen1Controller implements Initializable, ControlledScreen { ScreensController myController; /** * Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { // TODO } public void setScreenParent(ScreensController screenParent){ myController = screenParent; } @FXML private void goToScreen2(ActionEvent event){ new AlertDialog(null, "Hello world", AlertDialog.ICON_INFO); myController.setScreen(Screens.SCREEN_2); } @FXML private void goToScreen3(ActionEvent event){ myController.setScreen(Screens.SCREEN_3); } }