Hi,
I am learning the
Java thru Head first Java book. Now I am in AWT. I have one doubt in the below pgm.
I have two buttons, each have to do a separate thing. We can't (implement) use the actionPerformed() twice in the same class. So for that, i have two classes for two buttons.
Note: I know there is one better way than this to solve it. That is Inner Class
I just want to do it other than Inner Class, just for exercise.
How could i fix the below pgm. How o give each of the listener classes a reference to the main class.(I think that is the problem)
Error