int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(SOUTH); decrButton = createDecreaseButton(NORTH); break; }
  protected void installDefaults()  {    LookAndFeel.installColors(scrollbar, "ScrollBar.background",                              "ScrollBar.foreground");    LookAndFeel.installBorder(scrollbar, "ScrollBar.border");    scrollbar.setOpaque(true);    scrollbar.setLayout(this);    thumbColor = UIManager.getColor("ScrollBar.thumb");    thumbDarkShadowColor = UIManager.getColor("ScrollBar.thumbDarkShadow");    thumbHighlightColor = UIManager.getColor("ScrollBar.thumbHighlight");    thumbLightShadowColor = UIManager.getColor("ScrollBar.thumbShadow");    maximumThumbSize = UIManager.getDimension("ScrollBar.maximumThumbSize");    minimumThumbSize = UIManager.getDimension("ScrollBar.minimumThumbSize");  }