Look at the code below:
I'm registerint an anonymous class as an actionlistener for some component. I'd like to be able to refer the instance of the A object that the anonymous actionlistener 'belongs' to (i.e. `this` from A's perspective). I know that I can access any method, field of A but what do I do if I need to pass a reference of A as a paremeter to some other method?
Only way I could think of is in outlined in the second listing below.
I'm registerint an anonymous class as an actionlistener for some component. I'd like to be able to refer the instance of the A object that the anonymous actionlistener 'belongs' to (i.e. `this` from A's perspective). I know that I can access any method, field of A but what do I do if I need to pass a reference of A as a paremeter to some other method?
Only way I could think of is in outlined in the second listing below.