Java FX changing value of Label from different scene

后端 未结 3 493
孤街浪徒
孤街浪徒 2021-01-24 12:39

I have two scenes. The first scene invokes second scene using the following code.

@FXML
private void confirmation(ActionEvent event) throws IOException{
 Stage c         


        
3条回答
  •  自闭症患者
    2021-01-24 13:11

    Labels in FXML have a setText method. So for your case the "Proceed" label will look something like:

    Proceed.setText("The new text");
    

    As for the second part of the question, I'm not 100% sure as to what you are asking. I don't really see any case for the function to return true or false.

提交回复
热议问题