Java – best used: action vs actionlistener?
•
Java
Myself, I always use actionlistener as a swing event handler (such as button click), which is the most common listener I see in most swing applications
However, some swing professionals often recommend using action instead of actionlistener in stack overflow What are the benefits of doing so?
Solution
If you need to share functions between components, the preferred action is From docs
But also said
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码