Please see below code snippet, i would suggest using encapsulation, its always good practice.
Here is my first class
test, It has a TextField variable which is set to private (you could set it to public and access it directly, but that wouldn't be good OO design). I created a public method setTextField(
String str), which gives access to the setText method of the TextField.
Here is my second class test2, who will access the class tests public method TextField, and pass a string into the setTextField method. Which will update the TextField.
Hope this helps, if its not totally clear please let me know. Also, it may help if you posted a snippet of what youre working on, or an example.
~ea