code: private void fillInternalShadow(Graphics2D g, Shape s, boolean paintRightShadow) {
          Rectangle bounds = s.getBounds();
          int       x      = bounds.x;
          int       y      = bounds.y;
          int       w      = bounds.width;
          int       h      = bounds.height;
  
          s = shapeGenerator.createRectangle(x, y, w, 2);
          g.setPaint(getTopShadowGradient(s));
          g.fill(s);
  
          s = shapeGenerator.createRectangle(x, y, 1, h);
          g.setPaint(getLeftShadowGradient(s));
          g.fill(s);
  
          if (paintRightShadow) {
              s = shapeGenerator.createRectangle(x + w - 1, y, 1, h);
              g.setPaint(getRightShadowGradient(s));
              g.fill(s);
          }
      }
docs: Fill a rectangular shadow.
  
  @param g                the Graphics context to paint with.
  @param s                the shape to fill. This is only used for its
  bounds.
  @param paintRightShadow {@code true} if the shape is rectangular and the
  rightmost shadow should be painted, {@code false}
  otherwise.