Another way Aib, would be to pass the object to a method
- class A {
-
}
-
class B {
-
void b(A a) {
-
a.setColor();
-
}
-
}
-
There are implications of course and which approach to take depends on the design of your classes.
U kno wat "V....",
that is possible very much. However, then it would require the class design to have an instance of class A to be declared within class B for it to be in the scope of class B. ..........or else........
the method being used to receive the class A object has to made public like:
and have instaces of class B and A in another class to communicate.
In the case of the matter at hand, of buttons and forms being passed about, the second method would be more appropriate