Subject: change TextArea in GUI from another class
Posted By: jermsv1 Post Date: 10/28/2003 1:50:29 AM
Hey, I know you can do this I just don't know what to do. First off I have a GUI with a few TextAreas w/ the rows and cols defined... what I wanna do is setText for a specific TextArea, but from antoher class...I was thinking like making a constructor in my GUI like. I have about 10 TextArea's and was thinking of making a method like these for each TextArea...I dont' know if i would put that after i add the components, but i want them to show before you input text....Or would i have to add it again?

-----in my GUI class somewhere..
public void setText(JTextArea message)
{
textArea1.setText(message);
}
-----in my GUI class


-----Another Class

String message = "TextArea1";
GUIclass name = new GUIclass();
name.setText(message);
-----Another Class


Go to topic 5275

Return to index page 1018
Return to index page 1017
Return to index page 1016
Return to index page 1015
Return to index page 1014
Return to index page 1013
Return to index page 1012
Return to index page 1011
Return to index page 1010
Return to index page 1009