if (ypos != viewPosition.x)
if (ypos != viewPosition.y)
    public void stateChanged(ChangeEvent event)    {      JScrollBar vsb = scrollpane.getVerticalScrollBar();      JViewport vp = scrollpane.getViewport();      Point viewPosition = vp.getViewPosition();      int ypos = vsb.getValue();      if (ypos != viewPosition.x)        {          viewPosition.y = ypos;          vp.setViewPosition(viewPosition);        }      viewPosition.x = 0;      JViewport rowHeader = scrollpane.getRowHeader();      if (rowHeader != null           && !rowHeader.getViewPosition().equals(viewPosition))        rowHeader.setViewPosition(viewPosition);    }