FileDocCategorySizeDatePackage
UpdateApplet.javaAPI DocExample840Mon May 01 14:41:42 BST 2000None

UpdateApplet

public class UpdateApplet extends Applet implements Runnable

Fields Summary
private Thread
updateThread
int
updateInterval
Constructors Summary
Methods Summary
public voidrun()


         
        while ( updateThread != null ) {
            try {
                Thread.sleep( updateInterval );
            }
            catch (InterruptedException e ) {
                return;
            }
            repaint(  );
        }
    
public voidstart()

        if ( updateThread == null ) {
            updateThread = new Thread(this);
            updateThread.start(  );
        }
    
public voidstop()

        if ( updateThread != null ) {
            Thread runner = updateThread;
            updateThread = null;  // flag to quit
            runner.interrupt(  );   // wake up if asleep
        }