int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(SOUTH); decrButton = createDecreaseButton(NORTH); break; } scrollbar.add(incrButton); scrollbar.add(decrButton);
if (incrButton != null) scrollbar.add(incrButton); if (decrButton != null) scrollbar.add(decrButton);
  protected void installComponents()  {    int orientation = scrollbar.getOrientation();    switch (orientation)      {      case (JScrollBar.HORIZONTAL):        incrButton = createIncreaseButton(EAST);        decrButton = createDecreaseButton(WEST);        break;      default:        incrButton = createIncreaseButton(SOUTH);        decrButton = createDecreaseButton(NORTH);        break;      }    scrollbar.add(incrButton);    scrollbar.add(decrButton);  }