import java.awt.*; import java.applet.*; //This applet displays letters randomly around the screen that fade in and then gravitate to appropriate //positions to spell out a Happy Birthday message. Parameters are taken from the HTML file. public class HappyBirthday extends Applet implements Runnable { public final int WIDTH=500, HEIGHT=300; public String name, message, birthdaymessage; centerletter[] nameletters, birthdayletters, messageletters; //three arrays of letter objects for the three messages Thread anim; public int framecount; public void init() { setSize(WIDTH, HEIGHT); setBackground(Color.black); framecount=0; name=getParameter("bname"); //name of person taken from the webpage message=getParameter("message"); //message to the person taken from webpage birthdaymessage="Happy Birthday,"; //birthday message is hard coded birthdayletters= new centerletter[birthdaymessage.length()]; //three letters made into arrays of letter objects nameletters = new centerletter[name.length()]; messageletters = new centerletter[message.length()]; int Xstart = 250 - (birthdaymessage.length()*15); for (int i=0; ibirthdaymessage.length()) i=birthdaymessage.length(); for (j=0; jname.length()) //in the birthday message are being animated i=name.length(); if (i>=0) { for (k=0; kmessage.length()) //extra birthday message. i=message.length(); if (i>=0) { for (l=0; l0) for (int temp=0; temp0) for (int temp=0; temp0) for (int temp=0; temp