//ababian import java.util.*; import java.awt.*; import java.awt.image.*; import java.applet.*; public class time extends Applet implements Runnable{ /** diplays the time and date*/ String s=""; Date d; Thread cotton; // public void paint(Graphics g) { g.drawString(s,10,10); } public void start() { cotton = new Thread(this); cotton.start(); } public void stop() { cotton.stop();} public void run() { while (true) { try {Thread.currentThread().sleep(1000);} catch (InterruptedException e){}; d=new Date(); s=new String(d.toString()); repaint(); } } public void init() { setBackground(new Color(180,180,255)); } }