FileDocCategorySizeDatePackage
GradientPaintFill.javaAPI DocExample600Mon Apr 05 10:09:50 BST 1999None

GradientPaintFill

public class GradientPaintFill extends ApplicationFrame

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    GradientPaintFill f = new GradientPaintFill();
    f.setTitle("GradientPaintFill v1.0");
    f.setSize(200, 200);
    f.center();
    f.setVisible(true);
  
public voidpaint(java.awt.Graphics g)

    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);