import java.applet.*;
import java.awt.*;

public class Random extends Applet
{
	private Font coolFont;
	private int width;
	private int height;

	public void init()
	{
		setBackground(Color.black);
		setForeground(Color.yellow);
		coolFont = new Font("CourierNew", Font.PLAIN, 20);

		width= size().width;
		height= size().height;
	}

	public void paint(Graphics sun)
	{
		int x;
		int y;
		String message;
		message = "Carman" + " Rocks";

		for(int i=0; i <10; i++)
		{

			x = (int)((Math.random()*1000) % width);
			y = (int)((Math.random()*1000) % height);
			sun.drawString(message + "some text", x, y);
		}

		sun.setColor(Color.red);
		int i=0;
		while ( i < 10 )
		{
			x = (int)((Math.random()*1000) % width);
			y = (int)((Math.random()*1000) % height);
			sun.drawString(message, x, y);

			i++;
		}


		sun.setColor(Color.blue);
		i=0;
		do
		{
			x = (int)((Math.random()*1000) % width);
			y = (int)((Math.random()*1000) % height);
			sun.drawString(message, x, y);

			i++;
		}while ( i < 10 );


	}




}










