import java.awt.*; import java.applet.*; public class MarkiisiParametri extends Applet implements Runnable { Thread MarkiisinSaie = null; String Viesti; Font font = new Font("TimesRoman", Font.BOLD, 18); int x, y; public void init() { x = size().width; y = size().height / 2; Viesti = getParameter("Viesti"); if (Viesti == null) Viesti = "Laita parametri HTML-tiedostoosi !"; } public void start() { if (MarkiisinSaie == null) { MarkiisinSaie = new Thread(this); MarkiisinSaie.start(); } } public void run() { while (true) { x = x - 5; if (x == -200) x = size().width; repaint(); try { MarkiisinSaie.sleep(500); } catch (InterruptedException e) { } } } public void paint(Graphics g) { g.setFont(font); g.drawString(Viesti, x, y); } }