Another example

http://examples.javacodegeeks.com/desktop-java/awt/event/a-simple-mouse-
drag-example/