package texttime;
import java.applet.*;
import java.util.*;
import java.awt.*;
/**
*
@author Administrator
*/
public class TextTime extends Applet implements Runnable {
Thread th=null;
TextField tt=new TextField(30);
public void init(){
add(tt);
}
public void start(){
if(th==null){
th=new Thread(this);
th.start();
}
}
public void stop(){
if(th!=null){
th.stop();
th=null;
}
}
public void run(){
while(true){
Date dd=new Date();
tt.setText(dd.toGMTString());
try{
Thread.sleep(1000);
}catch(InterruptedException e){
}
}
}
/**
}
}
@param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here
TextTime tt = new TextTime();
tt.start();
}
}