Hello. I was wondering if someone could tell me what the “sender” and “target” parameters represent in an Action.Listener.
I presume the sender is much like the “source” in a java.util.Event. And I presume that the target in many cases is either null or superfluous?
I could see that the target might represent the node clicked in a tree, or the cell in a table, etc. but beyond these two examples I don’t really know what else it would be.
This is exactly what it’s currently used for (as the Javadoc indicates): indicating which item the action pertains to. One could imagine some other cases, for example: a context menu could be attached to a Panel (or some other ComponentContainer) and use ‘target’ to indicate which component within the Panel was actually clicked.