Mega Code Archive

 
Categories / Java Tutorial / Swing Event
 

The MouseListener Interface

The MouseListener Interface: respond to events when the mouse cursor is moved into or out of the area occupied by a component, or one of the mouse buttons is pressed, released, or clicked. Defined MethodsDescription mouseClicked(MouseEvent e)Called when a mouse button is clicked on a component - that is, when the button is pressed and released mousePressed(MouseEvent e)Called when a mouse button is pressed on a component mouseReleased(MouseEvent e)Called when a mouse button is released on a component mouseEntered(MouseEvent e)Called when the mouse enters the area occupied by a component mouseExited(MouseEvent e)Called when the mouse exits the area occupied by a component