import java.awt.*; public class Quadrate extends java.applet.Applet { public void paint (Graphics g) { quadrat(this, 100, 210, 210); } public void quadrat(Container ct, double l, double x, double y) { Graphics g = ct.getGraphics(); if (l > 0.5) { g.setColor(Color.black); g.drawRect((int)(x-l), (int)(y-l), (int)(2*l), (int)(2*l)); g.setColor(Color.yellow); g.fillRect((int)(x-l+1), (int)(y-l+1), (int)(2*l-1), (int)(2*l-1)); quadrat(ct, l/2, x-l, y-l); } } }