import java.awt.*; import java.applet.Applet; public class Koridor extends Applet{ public void paint(Graphics g){ int x=100, y=100, laius=200, korgus=200; while(laius>5){ g.drawRect(x, y, laius, korgus); g.drawOval(x, y, laius, korgus); g.drawOval(71, 71, (int) (Math.sqrt(2*laius*laius)) , (int) (Math.sqrt(2*korgus*korgus))); laius=laius/2; korgus=korgus/2; x=x+laius/2; y=y+laius/2; } } public static void main(String argumendid[]){ Frame f=new Frame("Koridor"); f.add(new Koridor()); f.setSize(400, 400); f.setVisible(true); } }