private Thread mythread;
public void start()
{
if (mythread==null){
mythread=new Thread();
mythread.start();
}
else {
mythread.resume();
}
}public void run()
{
while(true) {
try{
sleep(100);
catch(InterruptedException e) {}
}
}public void stop()
{
mythread.suspend();
}