Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.event

Interface MouseListener

java.lang.Object
|
+--java.util.EventListener
   |
   +--java.awt.event.MouseListener

All Implemented Interfaces:

EventListener


public interface MouseListener

implements 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:Author:See Also:

Method Summary

voidmouseClicked(java.awt.event.MouseEvent event)

This method is called when the mouse is clicked (pressed and released in short succession) on a component.
voidmouseEntered(java.awt.event.MouseEvent event)

This method is called when the mouse enters a component.
voidmouseExited(java.awt.event.MouseEvent event)

This method is called when the mouse exits a component.
voidmousePressed(java.awt.event.MouseEvent event)

This method is called when the mouse is pressed over a component.
voidmouseReleased(java.awt.event.MouseEvent event)

This method is called when the mouse is released over a component.

Method Details

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)

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

Parameters:


mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)

This method is called when the mouse enters a component.

Parameters:


mouseExited

public void mouseExited(java.awt.event.MouseEvent event)

This method is called when the mouse exits a component.

Parameters:


mousePressed

public void mousePressed(java.awt.event.MouseEvent event)

This method is called when the mouse is pressed over a component.

Parameters:


mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)

This method is called when the mouse is released over a component.

Parameters: