/* * Copyright (c) 1997-2000 by Mohan Embar. All Rights * Reserved. May not be reproduced or distributed * without express permission from the author. */ import java.awt.*; import java.io.*; import java.net.URL; import java.applet.Applet; public class IntroPage extends Applet implements Runnable { public void paint(Graphics g) { g.drawImage(m_img[m_nImg], 0, 0, null); g.drawString(m_arstrMsgs[m_nMsg], 40, 20); } public void run() { while (true) { try { Thread.sleep(200); if (++m_nImg == 2) m_nImg = 0; } catch (InterruptedException e) {} if (m_nTick++ == 10) { m_nTick = 0; if (++m_nMsg == m_arstrMsgs.length) m_nMsg = 0; } repaint(); } } public void init() { loadImages(); m_thrd = new Thread(this); } public void start() { m_thrd.start(); } public void stop() { m_thrd.stop(); } // private // private void loadImages() { MediaTracker tracker = new MediaTracker(this); String[] arstrImages = {"PegLgLft.gif", "PegLgRgt.gif"}; for (int i=0; i