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 ) ; } } ; }
Create the mouse motion listener .