// CartmanApplet.Java

import javax.swing.*;
import java.awt.*;

public class CartmanApplet extends JApplet

{
			private int num;

			public void init()
			{
			String number = JOptionPane.showInputDialog
				(null, "Enter a number of Cartmae to draw to see the coolest kids in South Park :");
			num = Integer.parseInt(number);
			}
			public void paint (Graphics gr)
			{
			setBackground(Color.blue);

			for (int n = 0; n < num; ++n)
			{
				int x = (int) (Math.random()*getWidth()-100);
				int y = (int) (Math.random()*getHeight()-70);
				Cartman cartman1 = new Cartman(x,y);
				cartman1.draw(gr);
			}

		}



}