code: 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);
      }
docs: Draw the "close" graphic for a state where it overlays a border.
  
  @param g      the Graphic context.
  @param width  the width of the graphic.
  @param height the height of the graphic.