private void drawOverlayGraphic(Graphics2D g,int width,int height){
  Shape s=shapeGenerator.createTabCloseIcon(2,2,width - 4,height - 4);
  g.setPaint(graphicBase);
  g.fill(s);
  s=shapeGenerator.createTabCloseIcon(2,3,width - 4,height - 4);
  g.setPaint(createGraphicDropShadowGradient(s));
  Shape oldClip=g.getClip();
  g.setClip(2,3,width - 4,height - 4);
  g.fill(s);
  g.setClip(oldClip);
}

private void drawOverlayGraphic ( Graphics2D g , int width , int height ) { Shape s = shapeGenerator . createTabCloseIcon ( 2 , 2 , width - 4 , height - 4 ) ; g . setPaint ( graphicBase ) ; g . fill ( s ) ; s = shapeGenerator . createTabCloseIcon ( 2 , 3 , width - 4 , height - 4 ) ; g . setPaint ( createGraphicDropShadowGradient ( s ) ) ; Shape oldClip = g . getClip ( ) ; g . setClip ( 2 , 3 , width - 4 , height - 4 ) ; g . fill ( s ) ; g . setClip ( oldClip ) ; }
draw the " close " graphic for a state where it overlays a border .
