it very much depends what the relationship between the two classes is. are they named-nested, are they in the same package, or one is derived from the other?
the most hmmm how to say the most obvious, but probably not so elegant way would be if class A, that has the Method has a referneces of type class B (probably pass the actual reference in a constructor)
assuming class B has some textField
and that the output of your method is a String:
In class B and define a
public void displayResult(String result){
textFileObject.setText(result);
}
and in class A u can have
referenceToObjectOfClassB.displayResult(methodThatDoesSomething());
ok, i hope i dont jsut confuse u. again it very much depends what the relationship between the two classes are.
u should clarify that so that someone from the pro's here can help u out better. good luck! Avendeval
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.