/*  marq.java   Scrolling marquee
	by Carla Alexander   */
import java.applet.*;
import java.awt.*;
public class Marq2 extends Applet implements Runnable
	{ int offset=0;
	  Thread mythread=null;
	public void paint(Graphics hg)
		{ hg.drawString("Readers Wanted",offset, 30);
			offset++;
                if(offset>=200)
                        offset=-100;
		}
	public void start()
		{ if (mythread==null)
			{ mythread=new Thread(this);
			  mythread.start();
			}
		}
	public void run()
		{ Thread thisthread=Thread.currentThread();
		  while(mythread==thisthread)
			{ try
				{	repaint();
					thisthread.sleep(100);
				}
			catch(InterruptedException hb)
			{	stop();
			}
			}
		}
	public void stop()
		{ mythread=null;
		}
	}
