title: Why are mouseDragged-events not received when using MouseAdapter?
body: <p>Why are <code>mouseDragged</code>-events only received when using <code>MouseMotionAdapter</code><br>
  and not when using <code>MouseAdapter</code> ? </p>
  
  <p>Java has two abstract adapter classes for receiving mouse-events ;<br>
  <code>MouseAdapter</code> and <code>MouseMotionAdapter</code>.</p>
  
  <p>Both classes have a <code>mouseDragged(MouseEvent e)</code>-method, but the<br>
  one in <code>MouseAdapter</code> does not seem to work ; <code>mouseDragged</code>-events<br>
  never get through with this one.  </p>
  
  <p>Both classes implement the <code>MouseMotionListener</code>-interface which<br>
  defines the <code>mouseDragged</code>-event, so I don't understand why it is<br>
  not working correctly on both of them. </p>
  
  <p>Here is sample-code which shows this issue :  </p>
  
  <pre><code>import java.awt.event.MouseAdapter;  
  import java.awt.event.MouseEvent;  
  import java.awt.event.MouseMotionAdapter;  
  import javax.swing.JFrame;  
  
  public class SwingApp extends JFrame
  {
      public SwingApp()
      {   
          // No mouseDragged-event is received when using this : 
      this.addMouseListener(new mouseEventHandler()); 
  
      // This works correct (when uncommented, of course) :
      // this.addMouseMotionListener(new mouseMovedEventHandler());
  
  
      setBounds(400,200, 550,300);
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      setResizable(false);
      setVisible(true);
      }   
  
    public static void main(String args[])
    {
      new SwingApp();
    }
  
    class mouseEventHandler extends MouseAdapter
    {         
      @Override
      public void mouseDragged(MouseEvent e) // Why is this method never called ?
      {
          System.out.println(String.format("MouseDragged via MouseAdapter / X,Y : %s,%s ", e.getX(), e.getY()));
      }
    } 
  
    class mouseMovedEventHandler extends MouseMotionAdapter
    {           
      @Override
      public void mouseDragged(MouseEvent e)
      {
          System.out.println(String.format("MouseDragged via MouseMotionAdapter / X,Y : %s,%s ", e.getX(), e.getY()));
      }
    } 
  
  }
  </code></pre>