import java.applet.Applet;import java.awt.*;import java.awt.Font;public class Laufschrift extends Applet{ private String text; private String schrift; private int size; private int style; private String farbe; int breite=200; int hoehe=40; private int pause=50; public void init(){ text=getParameter("namedestextes"); schrift=getParameter("schriftart"); size=Integer.parseInt(getParameter("size")); style=Integer.parseInt(getParameter("style")); Font fnt=new Font(schrift,style,size); setFont(fnt); } public void paint(Graphics g) { while(1==1){ for (int i=breite-1; i>-text.length(); i--){ g.copyArea(1, 0, breite, hoehe, -1, 0); g.clearRect(breite-1, 0, 1, hoehe); g.drawString(text,i,hoehe); try { Thread.sleep(pause); } catch (InterruptedException e){ System.out.println("Unterbrechung"); } } } } }
<html><head><title>Untitled</title></head><body><applet code="Laufschrift.class" width="200" height="50" align=top><param name="namedestextes" value="Hallelluja" ><param name="schriftart" value="SansSerif"><param name="size" value="30"><param name="style" value="1"></applet></body></html>