@Override
public void fill3DRect(int x, int y, int width, int height, boolean raised) {
// According to the spec, color should be used instead of paint,
// so Graphics.fill3DRect resets paint and
// it should be restored after the call
Paint savedPaint = getPaint();
super.fill3DRect(x, y, width, height, raised);
setPaint(savedPaint);
}