Perspective onActionPerformed vs onClick

What is the main difference in these events? I’ve been using onActionPerformed. But, noticed is some sample projects users were using onClick.

onClick only captures clicks. onActionPerformed will fire whenever the button is fired (whether it’s triggered by a click or a keypress) and onActionPerformed is also ‘aware’ of the enabled state of the component.

2 Likes

Thanks Paul