Please visit our sponsor

SleepTest

 

import java.applet.*;
import java.awt.*;

public class sleeptest extends Applet implements Runnable {

public Thread animationthread = null;

public void start()
{
    if (animationthread == null)
    {
         animationthread = new Thread(this,"animationthread");
         animationthread.start();
    }
}

public void stop()
{
    if ((animationthread != null) && animationthread.isAlive())
        animationthread.stop();
    animationthread = null;
}

public void run()
{
    while (true)
    {
        showStatus("Long");
        try {Thread.sleep(1000);}
        catch(InterruptedException e) {}
        showStatus("Live");
        try {Thread.sleep(1000);}
        catch(InterruptedException e) {}
        showStatus("Java!");
        try {Thread.sleep(1000);}
        catch(InterruptedException e) {}
    }
}
}

 


  This is a Mandomartis site: Other Mandomartis sites are:
 

 

 

 

 

Copyright © 1999 Scandinavia Online AB and Mandomartis Software Company