code: private MouseMotionAdapter createMouseMotionListener() {
          return new MouseMotionAdapter() {
              @Override
              public void mouseDragged(MouseEvent e) {
                  Point dragPoint = new Point(e.getPoint());
  
                  SwingUtilities.convertPointToScreen(dragPoint, fComponent);
  
                  fWindow.setLocation(dragPoint.x - dX, dragPoint.y - dY);
              }
          };
      }
docs: Create the mouse motion listener.
  
  @return the mouse motion listener.