-
MouseListener is an interface with methods:
- mousePressed
- mouseReleased
- mouseClicked
- mouseEntered
- mouseExited
Each method gets a parameter of type MouseEvent passed to it automatically when the corresponding event occurs.
The MouseEvent object has both public methods and some public data members. The x and y coordinates of the mouse position are public data members.