import java.applet.*;
import java.awt.*;
public class cantor extends Applet
{
    public void paint (Graphics g)
    {
	//starting oval
	cheese (0, 0, 300);
    }


    public void cheese (int x, int y, int d)
    { //x,y is top left corner of circle
	//d is the diameter of circle

	if (d < 2)
	    return;
	else
	{
	    Graphics g = getGraphics ();
	    //draw big
	    g.drawOval (x, y, d, d);
	    //change to next level
	    cheese (x, y + d / 4, d / 2);
	    cheese (x + d / 2, y + d / 4, d / 2);
	}
    }
}
