change TextArea in GUI from another class
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
|