if (tabPlacement == TOP) paintTopTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected); else if (tabPlacement == LEFT) paintLeftTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected); else if (tabPlacement == BOTTOM) paintBottomTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected); else if (tabPlacement == RIGHT) paintRightTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected); else throw new AssertionError("Unrecognised 'tabPlacement' argument.");
int bottom = y + h - 1; int right = x + w - 1;  switch (tabPlacement) { case LEFT: paintLeftTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected); break; case BOTTOM: paintBottomTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected); break; case  RIGHT: paintRightTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected); break; case TOP: default: paintTopTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected); }
  protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,           int x, int y, int w, int h, boolean isSelected)   {    if (tabPlacement == TOP)      paintTopTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected);    else if (tabPlacement == LEFT)       paintLeftTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected);    else if (tabPlacement == BOTTOM)      paintBottomTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected);    else if (tabPlacement == RIGHT)      paintRightTabBorder(tabIndex, g, x, y, w, h, 0, 0, isSelected);    else       throw new AssertionError("Unrecognised 'tabPlacement' argument.");  }