private static final int SLIDE_INTERVAL = 1000/30;
/** Animate the ghosted image returning to its origin. */
public void returnToOrigin() {
final Timer timer = new Timer(SLIDE_INTERVAL, null);
timer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Point location = dragImage.getLocationOnScreen();
Point dst = new Point(origin);
int dx = (dst.x - location.x)/2;
int dy = (dst.y - location.y)/2;