Myself, I always use ActionListener
as swing event-handler (e.g. button-click), and it is the most common listener I've seen in most swing applications.
However, Some Swing professionals here in stackoverflow often advise to use Action
rather than ActionListener
. What benefits I get from doing so?
An
Action
is preferred if you need to share functionality across components. From the docsbut also says