java.awt.event
Interface MouseListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
MouseInputListener
All Known Implementing Classes:
AWTEventMulticaster, BasicButtonListener, BasicComboPopup.InvocationMouseHandler, BasicComboPopup.ListMouseHandler, BasicDesktopIconUI.MouseInputHandler, BasicFileChooserUI.DoubleClickListener, BasicInternalFrameUI.BorderListener, BasicInternalFrameUI.GlassPaneDispatcher, BasicListUI.MouseInputHandler, BasicMenuItemUI.MouseInputHandler, BasicMenuUI.MouseInputHandler, BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.TrackListener, BasicSliderUI.TrackListener, BasicSplitPaneDivider.MouseHandler, BasicTabbedPaneUI.MouseHandler, BasicTableHeaderUI.MouseInputHandler, BasicTableUI.MouseInputHandler, BasicTextUI.BasicCaret, BasicToolBarUI.DockingListener, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, DefaultCaret, FormView.MouseEventListener, HTMLEditorKit.LinkController, MetalFileChooserUI.SingleClickListener, MetalToolBarUI.MetalDockingListener, MouseAdapter, MouseDragGestureRecognizer, MouseInputAdapter, ToolTipManager

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

Method Summary
 void mouseClicked(MouseEvent event)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseEntered(MouseEvent event)
          This method is called when the mouse enters a component.
 void mouseExited(MouseEvent event)
          This method is called when the mouse exits a component.
 void mousePressed(MouseEvent event)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(MouseEvent event)
          This method is called when the mouse is released over a component.
 

Method Detail

mouseClicked

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

mousePressed

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

Parameters:
event - the MouseEvent for the press

mouseReleased

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

Parameters:
event - the MouseEvent for the release

mouseEntered

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

Parameters:
event - the MouseEvent for the entry

mouseExited

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

Parameters:
event - the MouseEvent for the exit