public void recenter(Location loc)
    {
        originRow = loc.getRow();
        originCol = loc.getCol();
        repaint();
        JViewport vp = getEnclosingViewport();
        if (vp != null)
        {
            if (!isPannableUnbounded()
            || !(vp instanceof PseudoInfiniteViewport))
                vp.setViewPosition(pointForLocation(loc));
            else
                showPanTip();
        }
    }