// top gradient
g2.setPaint(new GradientPaint(0.0f, y,
new Color(220, 220, 220, 140),
0.0f, y + height / 2.0f,
new Color(220, 220, 220, 80)));
g2.fillRect(x, y, width, height / 2);
// bottom gradient
g2.setPaint(new GradientPaint(0.0f, y + height / 2.0f + 5.0f,
new Color(255, 255, 255, 0),
0.0f, y + height,
new Color(255, 255, 255, 70)));
g2.fillRect(x, y + height / 2, width, height / 2);