How to call particular instances of 2 different classes from each other?
I have class1, and class2 (a GUI).
When the program is run, an instance of class2 is created, and then it itself creates an instance of class1 (which helps it perform tasks in the background). This enables class2 to call the methods of class1. However, how can class1 call the methods of this particular instance of class2, without creating another instance of it?
Thank You
[393 byte] By [
what2097a] at [2007-10-2 15:50:25]

Say I have a class3 and a class4 also.
Class1 has 'private static class3 class3Object = new class3();' in the constructor.
Can class4 invoke methods on class3Object?
Pressumably, class3Object would have to be made public, but even then, how can it be called from class1?
Thanks for the quick response!
Ah, I made class3Object public, and then invoked it from class4 using 'Class1.class3Object.method();'.Is there anyway to do this without making class3Object public however?Thanks