I have the following structure:
public class A {
private javax.swing.JLabel fullName;
public class B {
public B() {
fullName.setText("Martha Stewart");
}
}
...
...
...
}
My goal is to have B (currently the sub class of A) to be in a separate class.
The problem is: When I separate the two classes, I lose functionality on the .setText() call for the JLabel. I realize that if B is in a separate class, I would have to write a public setter method in class A.
This, however, is not plausible since I have about 100 buttons and use 4-5 different functions for each button. Creating a getter/setter method for each function is not plausible IMHO.
I'm trying to wrap my head around a better solution... can any of you help, friends?