If you want to have an applet that does what the above does just copy the following java file and modify the message strings to fit your needs. Then, of course, you must recompile it using a 1.1 compatable java compiler. If you don't have one go to java.sun.com and download the 1.1 version of the language and recompile this with your messages. The compiler is free so you don't need to spend money to have a good working applet.
The file you'll need to add your own messages. Change the values of the strings, but do not delete any of the strings. If you cannot think of four messages just delete the stuff inside of the double quotes.