Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jeff Cunningham   on Dec 07 In Java Category.

  
Question Answered By: Troy Kelley   on Dec 07

If the other class  was named OtherClass

and the JTextArea was named textArea

OtherClass anotherClass = new OtherClass();
JTextArea myTextArea =anotherClass.textArea;

or

JTextArea myTextArea = (new OtherClass()).textArea;

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Accessing from another file Or get search suggestion and latest updates.


Tagged: