Dear experts, please tell me! There is a controller in which there is a TextArea :

 public class Controller { @FXML public TextArea ta; } 

How to access TextArea from another class? How to pass a String ?

    1 answer 1

    You must have a link to this created controller, and either you do

     controller.ta // что плохо 

    or you create a method (in the Controller class) that accepts a string, and put this string in the TextArea :

     public void setTextToArea(String s) { this.ta.setText(s); }