import java.awt.*;
import java.applet.*;

public class Rect2a extends Applet {

  int shape;

  public void init() {
    shape=0;
  }

  public void paint (Graphics g)
  {
    int x0, y0;  // Mittelpunkt
    int x, y;      // Mittelpunkt  links / oben
    int w, h;     // Breite Höhe
    int diff;
    x0 = 150;
    y0 = 175;
    diff = 50;
    w=100;
    h=50;

    g.setColor(Color.red);
    g.drawLine(x0-200,y0,x0+200,y0);		 g.drawLine(x0,y0-200,x0,y0+200);

    g.setColor(Color.blue);
    for (int i=0; i<10; i++) {
       g.drawRect(x0,y0,w,h);
       x0-=10;
       y0-=10;
       w+=20;
       h+=20;
    }  // for

  }




    /**
     * Stop the insanity, um, applet.
     */
    public synchronized void stop() {
    }


    public String getAppletInfo() {
        return "A simple drawing program.";
    }

    public static void main(String args[]) {
      Frame f = new Frame("Rect2");
     	Rect2a rect = new Rect2a();
    	rect.init();
    	rect.start();
      f.add("Center", rect);
     	f.setSize(500,400);
    	f.show();
    }


}



