Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

reference to communicate between two classes

  Asked By: Sean    Date: Jun 03    Category: Java    Views: 1238
  

I am in the predicament position, help please.
Following is my simple code but somehow it does not
compiled. I know that I need a reference to
communicate between two classes. But how?

class AppForm {
resultArea=new JTextArea();
}

class Operations {
public void Results() {
print(resultArea);
}
}

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Stacy Cunningham     Answered On: Jun 03

I think that you should declare 'resultArea' a new
class 'AppFrame' and two classes  AppForm and
Operations are inner classes of class  'AppFrame'. I
think this is a rapid and simple  solution.

 
Didn't find what you were looking for? Find more on reference to communicate between two classes Or get search suggestion and latest updates.




Tagged: