title: What is the use of class MouseMotionAdapter when we have class MouseAdapter?
body: <p>I create the following applet--></p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import java.applet.*;
  public class Adapting extends Applet
  {
  public void init()
  {
  addMouseListener(new MyMouseAdapter(this));
  addMouseMotionListener(new MyMouseAdapter(this));
  }
  }//end of class
  
  class MyMouseAdapter extends MouseAdapter
  {
  Adapting a;
  public MyMouseAdapter(Adapting a)
  {
  this.a=a;
  }
  
  public void mouseClicked(MouseEvent me)
  {
  a.setBackground(Color.red);
  }
  
  public void mouseMoved(MouseEvent me)
  {
  a.showStatus("Moving Mouse at "+me.getX()+","+me.getY());
  }
  }
  /*&lt;applet code=Adapting height=500 width=600&gt;&lt;/applet&gt;*/
  </code></pre>
  
  <p>For both the listeners corresponding to MouseEvent, i.e <code>MouseListener</code> and <code>MouseMotionListener</code>, i use the adapter class <code>MouseAdapter</code>. <strong>If, the <code>MouseAdapter</code> class is getting my work done for listening Mouse Motion Events also, what is the use of the class <code>MouseMotionAdapter</code> ?</strong></p>