java.awt.event

Interface MouseListener

public interface MouseListener extends EventListener

This interface is for classes that wish to receive mouse events other than simple motion events. This includes clicks (but not mouse wheel events), and crossing component boundaries without change in button status. To track moves and drags, use MouseMotionListener, and to track wheel events, use MouseWheelListener. To watch a subset of these events, use a MouseAdapter.

Since: 1.1

See Also: MouseAdapter MouseEvent

UNKNOWN: updated to 1.4

Method Summary
voidmouseClicked(MouseEvent event)
This method is called when the mouse is clicked (pressed and released in short succession) on a component.
voidmouseEntered(MouseEvent event)
This method is called when the mouse enters a component.
voidmouseExited(MouseEvent event)
This method is called when the mouse exits a component.
voidmousePressed(MouseEvent event)
This method is called when the mouse is pressed over a component.
voidmouseReleased(MouseEvent event)
This method is called when the mouse is released over a component.

Method Detail

mouseClicked

public void mouseClicked(MouseEvent event)
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Parameters: event the MouseEvent indicating the click

mouseEntered

public void mouseEntered(MouseEvent event)
This method is called when the mouse enters a component.

Parameters: event the MouseEvent for the entry

mouseExited

public void mouseExited(MouseEvent event)
This method is called when the mouse exits a component.

Parameters: event the MouseEvent for the exit

mousePressed

public void mousePressed(MouseEvent event)
This method is called when the mouse is pressed over a component.

Parameters: event the MouseEvent for the press

mouseReleased

public void mouseReleased(MouseEvent event)
This method is called when the mouse is released over a component.

Parameters: event the MouseEvent for the release