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.
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); }
The event that has occurred.
Does nothing. Override this function to be notified when the mouse is dragged.
The event that has occurred.
Does nothing. Override this function to be notified when the mouse moves.
MouseEvent, MouseMotionListener