@Override
    protected void paintTabBackground( Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected ){
       Graphics2D g2D = (Graphics2D)g;
       //colores degradados para los tabs
       GradientPaint gradientSel = new GradientPaint( 0, 0,  new Color(242,249,242), 0, y+h/2, new Color(217,237,246) );
       GradientPaint gradientUnsel = new GradientPaint( 0, 0,  new Color(232,232,232), 0, y+h/2, new Color(205,205,205) );    

       switch( tabPlacement ){
           case LEFT: 
           case RIGHT:        
           case BOTTOM:
               /* codigo para estos tabs */
               break;
           case TOP:
           default:            
               xp = new int[]{ x, 
                               x,
                               x+4,
                               x+w+5,
                               x+w+5,
                               x+w,
                               x+w,
                               x
               };
               yp = new int[]{ y+h,
                               y+4,
                               y,
                               y,
                               y+5,
                               y+10,
                               y+h,
                               y+h
               };
             break;
       }

       shape = new Polygon( xp, yp, xp.length );

       if ( isSelected ){         
            g2D.setPaint( gradientSel );}
       else{        
           g2D.setPaint( gradientUnsel );
       }
       g2D.fill( shape );
    }