FileDocCategorySizeDatePackage
circleerrors.javaAPI DocExample504Thu Jul 13 11:41:00 BST 2000None

circleerrors.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 circleerrors extends Applet	// this is the applet
{
	public void paint(Graphics g) 	// this does the drawing
	{
		g.setColor(Color.red);				// set the drawing pen colour
		g.fillrect(100, 100, 100, 100);  // draw a filled square
		g.drawString("One red square", 100, 220); // write the string
	}
}