This program presents the user with two movable balls, one of which drags correctly, and one which does not. It demonstrates the correct technique for dragging an object, which moves the object by the distance traveled by the mouse. The incorrect technique uses the moveTo method to drag the object.

Note: This demo requires a Java enabled browser. If you see this message then your browser either doesn't support Java or has had Java disabled.

Click below to download the source files for DoubleWhatADrag.