private static Path2D createLeftTabShape(int x,int y,int w,int h,double rLeft,boolean addSide){
  Path2D path=new Path2D.Double();
  path.append(new Line2D.Double(x + w,y + h,x + rLeft,y + h),true);
  QuadCurve2D curve=new QuadCurve2D.Double(x + rLeft,y + h,x,y + h,x,y + h - rLeft);
  path.append(curve,true);
  path.append(new Line2D.Double(x,y + h - rLeft,x,y + rLeft),true);
  curve=new QuadCurve2D.Double(x,y + rLeft,x,y,x + rLeft,y);
  path.append(curve,true);
  path.append(new Line2D.Double(x + rLeft,y,x + w,y),true);
  if (addSide) {
    path.append(new Line2D.Double(x + w,y,x + w,y + h - 1),true);
  }
  return path;
}

private static Path2D createLeftTabShape ( int x , int y , int w , int h , double rLeft , boolean addSide ) { Path2D path = new Path2D . Double ( ) ; path . append ( new Line2D . Double ( x + w , y + h , x + rLeft , y + h ) , true ) ; QuadCurve2D curve = new QuadCurve2D . Double ( x + rLeft , y + h , x , y + h , x , y + h - rLeft ) ; path . append ( curve , true ) ; path . append ( new Line2D . Double ( x , y + h - rLeft , x , y + rLeft ) , true ) ; curve = new QuadCurve2D . Double ( x , y + rLeft , x , y , x + rLeft , y ) ; path . append ( curve , true ) ; path . append ( new Line2D . Double ( x + rLeft , y , x + w , y ) , true ) ; if ( addSide ) { path . append ( new Line2D . Double ( x + w , y , x + w , y + h - 1 ) , true ) ; } return path ; }
creates the shape for a left tab .
