I just started to learn how to use action listeners. To my understanding it works in the following way:
There are some classes which contains \"addActionLis
The way I have always found useful is to create a separate class which implements the ActionListener interface and all the other methods necessary to carry the action. This way, an action is not tied to a specific object and can be triggered from a button, a menu, etc. A little bit like the Command pattern I guess. It keeps the code simple.
Anonymous classes aren't reusable.
Redirection to the object containing the listenedObject leads to gigantic classes that are hard to maintain.