7
What is the difference between these two events: mouseClicked() and actionPerformed()? What differs in their execution and when they will be executed?
7
What is the difference between these two events: mouseClicked() and actionPerformed()? What differs in their execution and when they will be executed?
5
Actionperformed will respond when the button is triggered, either by mouse or keyboard, Mouseclicked will only notify when the mouse is used.
Source: Difference between Mouseclicked and Actionperformed?
2
The event mouseClicked()
is part of the Interface Mouselistener, "listener" interface of events related to mouse and controls its events. This "listener" is called when the mouse button has been clicked (pressed and released) into a component.
The event actionPerformed()
is part of the Interface Actionlistener, "listener" interface of action events and controller of the defined actions of a component. This "listener", in general lines, is called when an action occurs.
Browser other questions tagged java
You are not signed in. Login or sign up in order to post.
It was faster than me :D
– NilsonUehara