GradientPaintFill f = new GradientPaintFill(); f.setTitle("GradientPaintFill v1.0"); f.setSize(200, 200); f.center(); f.setVisible(true);
Graphics2D g2 = (Graphics2D)g; Ellipse2D e = new Ellipse2D.Float(40, 40, 120, 120); GradientPaint gp = new GradientPaint(75, 75, Color.white, 95, 95, Color.gray, true); g2.setPaint(gp); g2.fill(e);