@Override protected void paintTabBorder(Graphics g,int tabPlacement,int tabIndex,int x,int y,int w,int h,boolean isSelected){
  g.setColor(isSelected ? darkShadow : shadow);
switch (tabPlacement) {
case LEFT:
    g.drawLine(x + 1,y + h - 2,x + 1,y + h - 2);
  g.drawLine(x,y + 2,x,y + h - 3);
g.drawLine(x + 1,y + 1,x + 1,y + 1);
g.drawLine(x + 2,y,x + w - 1,y);
g.drawLine(x + 2,y + h - 2,x + w - 1,y + h - 2);
g.drawLine(x + 2,y + h - 1,x + w - 1,y + h - 1);
break;
case RIGHT:
g.drawLine(x,y,x + w - 3,y);
g.drawLine(x,y + h - 2,x + w - 3,y + h - 2);
g.drawLine(x + w - 2,y + 2,x + w - 2,y + h - 3);
g.drawLine(x + w - 2,y + 1,x + w - 2,y + 1);
g.drawLine(x + w - 2,y + h - 2,x + w - 2,y + h - 2);
g.drawLine(x + w - 1,y + 2,x + w - 1,y + h - 3);
g.drawLine(x,y + h - 1,x + w - 3,y + h - 1);
break;
case BOTTOM:
g.drawLine(x,y,x,y + h - 2);
g.drawLine(x + 1,y + h - 2,x + w - 1,y + h - 2);
g.drawLine(x + w - 1,y,x + w - 1,y + h - 2);
break;
case TOP:
default :
g.drawLine(x,y + 2,x,y + h - 1);
g.drawLine(x + 1,y + 1,x + 1,y + 1);
g.drawLine(x + 2,y,x + w - 3,y);
g.drawLine(x + w - 2,y + 2,x + w - 2,y + h - 1);
g.drawLine(x + w - 1,y + 2,x + w - 1,y + h - 1);
g.drawLine(x + w - 2,y + 1,x + w - 2,y + 1);
}
}

@ Override protected void paintTabBorder ( Graphics g , int tabPlacement , int tabIndex , int x , int y , int w , int h , boolean isSelected ) { g . setColor ( isSelected ? darkShadow : shadow ) ; switch ( tabPlacement ) { case LEFT : g . drawLine ( x + 1 , y + h - 2 , x + 1 , y + h - 2 ) ; g . drawLine ( x , y + 2 , x , y + h - 3 ) ; g . drawLine ( x + 1 , y + 1 , x + 1 , y + 1 ) ; g . drawLine ( x + 2 , y , x + w - 1 , y ) ; g . drawLine ( x + 2 , y + h - 2 , x + w - 1 , y + h - 2 ) ; g . drawLine ( x + 2 , y + h - 1 , x + w - 1 , y + h - 1 ) ; break ; case RIGHT : g . drawLine ( x , y , x + w - 3 , y ) ; g . drawLine ( x , y + h - 2 , x + w - 3 , y + h - 2 ) ; g . drawLine ( x + w - 2 , y + 2 , x + w - 2 , y + h - 3 ) ; g . drawLine ( x + w - 2 , y + 1 , x + w - 2 , y + 1 ) ; g . drawLine ( x + w - 2 , y + h - 2 , x + w - 2 , y + h - 2 ) ; g . drawLine ( x + w - 1 , y + 2 , x + w - 1 , y + h - 3 ) ; g . drawLine ( x , y + h - 1 , x + w - 3 , y + h - 1 ) ; break ; case BOTTOM : g . drawLine ( x , y , x , y + h - 2 ) ; g . drawLine ( x + 1 , y + h - 2 , x + w - 1 , y + h - 2 ) ; g . drawLine ( x + w - 1 , y , x + w - 1 , y + h - 2 ) ; break ; case TOP : default : g . drawLine ( x , y + 2 , x , y + h - 1 ) ; g . drawLine ( x + 1 , y + 1 , x + 1 , y + 1 ) ; g . drawLine ( x + 2 , y , x + w - 3 , y ) ; g . drawLine ( x + w - 2 , y + 2 , x + w - 2 , y + h - 1 ) ; g . drawLine ( x + w - 1 , y + 2 , x + w - 1 , y + h - 1 ) ; g . drawLine ( x + w - 2 , y + 1 , x + w - 2 , y + 1 ) ; } }
this function draws the border around each tab note that this function does now draw the background of the tab . that is done elsewhere
