
/**
 *  The class Draw1 defines an applet that draws a simple
 *  picture. It really doesn't make much sense to use an 
 *  applet to draw a static image.  However, it's done
 *  here as a demo of some of Java's graphics routines.
 */

import java.awt.*;
import java.applet.Applet;

public class Draw1 extends Applet {

   /**
    *  The init() method is called by the system to initialize
    *  the applet.  Here, it is used to set the background color
    *  of the applet.  The drawing in the paint() method will
    *  be done on top of a rectangle filled with this color.
    */
   public void init() {
      setBackground(Color.blue);
   }
   
   /**
    *  The paint() method is called by the system to draw the
    *  contents of the applet.  Here, the paint method just draws
    *  a simple, fixed image. 
    */
   public void paint(Graphics g) {
      g.setColor(Color.red);
      g.fillOval(20,20,160,160);
      g.setColor(Color.white);
      g.drawString("Here's a big red dot:", 10, 15);
   }

} // end class Draw1
