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

public class Rect1 extends Applet {

  int shape;

  public void init() {
    shape=0;
  }

  public void paint (Graphics g)
  {
    int x, y;  // Mittelpunkt
    int w, h;  // Breite Höhe

    for (int i=0; i<10; i++) {
      x = (int) (  400*Math.random() );	// Links Oben
      y = (int) (  200*Math.random() );	 // Links Oben
      w = (int) (  400*Math.random() );	// Width
      h = (int) (  200*Math.random() );	// Height
      g.drawRect(x,y,w,h);
    }
  }




    /**
     * 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("Rect1");
     	Rect1 rect = new Rect1();
    	rect.init();
    	rect.start();
      f.add("Center", rect);
     	f.setSize(500,400);
    	f.show();
    }


}



