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
}
}
|