verticalScrollBar = scrollPane.getVerticalScrollBar(); horizontalScrollBar = scrollPane.getHorizontalScrollBar(); verticalScrollBarPolicy = scrollPane.getVerticalScrollBarPolicy(); horizontalScrollBarPolicy = scrollPane.getHorizontalScrollBarPolicy();
vsb = scrollPane.getVerticalScrollBar(); hsb = scrollPane.getHorizontalScrollBar(); vsbPolicy = scrollPane.getVerticalScrollBarPolicy(); hsbPolicy = scrollPane.getHorizontalScrollBarPolicy();
  public void syncWithScrollPane(JScrollPane scrollPane) {    viewport = scrollPane.getViewport();    verticalScrollBar = scrollPane.getVerticalScrollBar();    horizontalScrollBar = scrollPane.getHorizontalScrollBar();    verticalScrollBarPolicy = scrollPane.getVerticalScrollBarPolicy();    horizontalScrollBarPolicy = scrollPane.getHorizontalScrollBarPolicy();    lowerLeft = scrollPane.getCorner(LOWER_LEFT_CORNER);    lowerRight = scrollPane.getCorner(LOWER_RIGHT_CORNER);    upperLeft = scrollPane.getCorner(UPPER_LEFT_CORNER);    upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER);      }