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

/* <applet code="Graffiti" width="300" height="300">
   <param name="WordNumber" value="1000">  
   </applet>
*/

// Copyright Samar Abbas 2000

public class Graffiti extends Applet
{
 int WordCount;
 public void init()
 {
  WordCount = Integer.parseInt( getParameter("WordNumber") );
 }

 public void paint(Graphics g) 
 {
  setBackground(Color.black);
  try{
      for (int count=0; count<WordCount; count++)
       {
       int x = (int)( getSize().width * Math.random() );
       int y = (int)( getSize().height * Math.random() );
       g.setColor(Color.red);
       g.drawString( "This is Graffiti International", x, y );
       g.setColor(Color.cyan);
       g.drawString( "World's Largest Graffiti Co.", x+50, y+50 );
       Thread.sleep(200);    
       }
     }
  catch( InterruptedException e )
    {
     System.out.println("Interrupted Exception caught");
    }
 }

}
