[Chapter 21] MouseMotionAdapter

#

| Chapter 21 java.awt.event Reference |

# MouseMotionAdapter

## Name

MouseMotionAdapter

##

## Description

The `MouseMotionAdapter` class implements the methods of `MouseMotionListener` with empty functions. It may be easier for you to extend `MouseMotionAdapter`, overriding only those methods you are interested in, than to implement `MouseMotionListener` and provide the empty functions yourself.

## Class Definition

    public abstract class java.awt.event.MouseMotionAdapter
       extends java.lang.Object
       implements java.awt.event.MouseMotionListener {
      // Instance Methods
      public void mouseDragged (MouseEvent e);
      public void mouseMoved (MouseEvent e);
    }

## Instance Methods

### mouseDragged

#### public void mouseDragged (MouseEvent e)

Parameters

  e

    The event that has occurred.

Description

  Does nothing. Override this function to be notified when the mouse is dragged.

### mouseMoved

#### public void mouseEntered (MouseEvent e)

Parameters

  e

    The event that has occurred.

Description

  Does nothing. Override this function to be notified when the mouse moves.

## See Also

`MouseEvent`, `MouseMotionListener`

MouseListener |  | MouseMotionListener