The list of methods to do Draw Shadow are organized into topic(s).
void
drawShadow(Graphics2D g2d, Color topColor, float opacity, int shadowWidth, int cornerRadius, int x, int y, int width, int height) draw Shadow
if (shadowWidth == 0) {
return;
g2d.setColor(new Color(topColor.getRed(), topColor.getGreen(), topColor.getBlue(),
((int) (opacity * 255)) & 0xFF));
float alpha = 0.1f;
float step = (float) (0.9 / shadowWidth);
for (int i = 1; i <= shadowWidth; i++) {
...
void
drawShadowedShape(Shape shape, Graphics2D g2d) draw Shadowed Shape
Color holdColor = g2d.getColor();
g2d.setColor(Color.black);
AffineTransform holdTransform = g2d.getTransform();
float lineWidth = g2d.getStroke() instanceof BasicStroke ? ((BasicStroke) (g2d.getStroke())).getLineWidth()
: 1.0f;
g2d.translate(lineWidth, lineWidth);
g2d.draw(shape);
g2d.setColor(holdColor);
...