FileDocCategorySizeDatePackage
circle2.javaAPI DocExample491Thu Jul 13 12:02:44 BST 2000None

circle2.java

import java.awt.*;			// make of existing graphics code
import java.applet.*;		// make of existing applet code

// Create an applet and draw a small circle on
// the screen.


public class circle2 extends Applet	// this is the applet
{
	public void paint(Graphics g)	   // this does the drawing
	{
		g.setColor(Color.red);			// set the drawing pen to red
		g.fillOval(0, 0, 60, 60); // draw the filled circle
		g.drawString("One red  circle", 0, 80); //write the string
	}
}