I have two scenes. The first scene invokes second scene using the following code.
@FXML
private void confirmation(ActionEvent event) throws IOException{
Stage c
Assuming that you have a controller called:confirmation_controller.java'.
inside that controller, you have a public method getProceedLabel()
that returns a reference for the label called Proceed
. you can try the following code:
Stage confirmation_stage;
Parent confirmation;
confirmation_stage=new Stage();
FXMLLoader loader = new FXMLLoader(getClass().getResource("Confirmation.fxml"));
confirmation = loader.load();
confirmation_controller controller = loader.getController();
Label label = controller.getProceedLabel();
label.setText("..."):
confirmation_stage.setScene(new Scene(confirmation));
confirmation_stage.initOwner(generate_button.getScene().getWindow());
confirmation_stage.show();