'difference between mouseReleased and mouseClicked

searching on the JAVA api document, i knew the difference between the mousePressed and mouseClicked. but.. the mouseClicked method involves both pressing and releasing so the action is done after the releasing the mouse, i don't find much difference with mouseReleased.

when i tried myself, i found that pressed and clicked are different because the time of action is different, but it's not the case between clicked and released.

my program is about drawing oval at the selected point in canvas

i'm looking for help in this problem.



Solution 1:[1]

mouseClicked work when you press and release the mouse button in the same coordinates, obviously inside the JComponent.
mousePressed work as soon as press the mouse button in the JComponent.
mouseReleased work as soon as release the mouse button, provided that has previously press in the JComponent.

While you press the mouse button in the JComponent, no matter the final coordinate for to release the mouse button, it could even be outside the JComponent.
In all cases no matter the length of time between pressing and releasing.

HCL from PerĂº

Solution 2:[2]

MouseDragged, generated when the user moves the mouse while holding down a mouse button;

MouseReleased, generated when the user releases one of the buttons on the mouse;

void mouseReleased(MouseEvent e)

Invoked when a mouse button has been released on a component.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 hcrisanto
Solution 2 Rails Abam De Dev