else if (propName.equals("verticalScrollBar")) { JScrollBar oldSb = (JScrollBar) e.getOldValue(); oldSb.getModel().removeChangeListener(vsbChangeListener); JScrollBar newSb = (JScrollBar) e.getNewValue(); newSb.getModel().addChangeListener(vsbChangeListener); } else if (propName.equals("horizontalScrollBar")) { JScrollBar oldSb = (JScrollBar) e.getOldValue(); oldSb.getModel().removeChangeListener(hsbChangeListener); JScrollBar newSb = (JScrollBar) e.getNewValue(); newSb.getModel().addChangeListener(hsbChangeListener); }
    public void propertyChange(PropertyChangeEvent e)    {      if (e.getPropertyName().equals("viewport"))        updateViewport(e);      else if (e.getPropertyName().equals("rowHeader"))        updateRowHeader(e);      else if (e.getPropertyName().equals("columnHeader"))        updateColumnHeader(e);      else if (e.getPropertyName().equals("horizontalScrollBarPolicy")          || e.getPropertyName().equals("verticalScrollBarPolicy"))        updateScrollBarDisplayPolicy(e);    }