import java.awt.*;
import java.applet.Applet;
import java.net.*;
/*
*/
public class AppletFrame extends Applet implements Runnable {
private Image bgImage1 = null;
private Image bgImage2 = null;
private Image offScreenImage;
private Dimension offScreenSize;
private Graphics offScreenGraphics;
private Thread runner = null;
private String theStr;
private Color colors [];
private Font f;
private FontMetrics fm;
private char theChars[];
private int SleepTime=100;
private int strlen;
private int offsets [];
private int Xsize,Ysize;
private int xPos=10; // Initial position of the string;
private int yPos=30; // Y-Postion
private int phase=0,phase2=0;
public void init() {
float h;
theStr = getParameter("font");
if(theStr == null) {
f = new Font("TimesRoman",Font.BOLD | Font.ITALIC,24);
} else {
f = new Font(theStr,Font.BOLD | Font.ITALIC,24);
}
fm = getFontMetrics(f);
yPos = fm.getAscent()+5;
theStr = getParameter("text");
if(theStr == null) {
theStr="Vivet, Russia!";
}
Xsize = size().width;
Ysize = size().height;
resize(40+fm.stringWidth(theStr),20+fm.getHeight());
strlen = theStr.length();
theChars = new char [strlen];
offsets = new int [strlen];
colors = new Color[strlen];
theStr.getChars(0,strlen,theChars,0);
for(int i=0;i