if (vsb != null)
if (vp != null && event.getSource() == vp)
        public void stateChanged(ChangeEvent event)        {          int xpos = 0;          int ypos = 0;          JScrollBar vsb = JScrollPane.this.getVerticalScrollBar();          JScrollBar hsb = JScrollPane.this.getHorizontalScrollBar();                    if (vsb != null)            {              BoundedRangeModel vmod = vsb.getModel();              if (vmod != null)                ypos = vmod.getValue();            }          if (hsb != null)            {              BoundedRangeModel hmod = hsb.getModel();              if (hmod != null)                xpos = hmod.getValue();            }          if (JScrollPane.this.viewport != null)            JScrollPane.this.viewport.setViewPosition(new Point(xpos, ypos));        }