Color color = (Color)fillPaint;
Color color = (Color)paint;
    public Paint getGradientPaintForShape(Shape shape, Paint paint) {	if (paint instanceof Color) {	    Color color = (Color)fillPaint;	    Rectangle rect = shape.getBounds();	    paint = new GradientPaint((float)rect.getWidth()*.3f,				      (float)rect.getHeight()*.3f, 				      color.brighter().brighter(),				      (float)rect.getWidth()*.7f, 				      (float)rect.getHeight()*.7f, 				      color.darker().darker());	}	return paint;    }