@Override
    public void mouseReleased(MouseEvent e) {
        if (!potentialDrag) {
            return;
        }

        source.removeMouseMotionListener(this);
        potentialDrag = false;

        if (changeCursor) {
            source.setCursor(originalCursor);
        }

        if (destination instanceof JComponent) {
            ((JComponent) destination).setAutoscrolls(autoscrolls);
        }

        //  Layout the components on the parent container

        if (autoLayout) {
            if (destination instanceof JComponent) {
                ((JComponent) destination).revalidate();
            } else {
                destination.validate();
            }
        }

        if (destination instanceof SmartTextBox) {
            try {
                ((SmartTextBox) destination).handleMove();
            } catch (Exception ex) {
                Logger.getLogger(ComponentMover.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }