#

| Chapter 21 java.awt.event Reference |

# MouseMotionListener

## Name

MouseMotionListener

##

## Description

Objects that implement the `MouseMotionListener` interface can receive motion-oriented `MouseEvent` objects. Listeners must first register themselves with objects that produce events. When events occur, they are automatically propagated to all registered listeners.

## Interface Definition

    public abstract interface java.awt.event.MouseMotionListener
       extends java.util.EventListener {
      // Instance Methods
      public abstract void mouseDragged (MouseEvent e);
      public abstract void mouseMoved (MouseEvent e);
    }

## Interface Methods

### mouseDragged

#### public abstract void mouseDragged (MouseEvent e)

Parameters

  e

    The key event that occurred.

Description

  Notifies the `MouseMotionListener` that the mouse has been dragged.

### mouseMoved

#### public abstract void mouseMoved (MouseEvent e)

Parameters

  e

    The key event that occurred.

Description

  Notifies the `MouseMotionListener` that the mouse has been moved.

## See Also

`AWTEventMulticaster`, `EventListener`, `MouseEvent`, `MouseMotionAdapter`

MouseMotionAdapter |  | PaintEvent