import java.io.*; 
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.lang.*;
import java.util.*;

public class TimeUpdater extends Thread {


  public TimeUpdater(CalendarFrame calframe)
  {
    calendar = calframe;
  }

  public void run()  {
    
    TodaysDate today = new TodaysDate();

    try {
      timepanel = new TimePanel();
      calendar.add(timepanel);
      timepanel.setBounds(350,480,250,100);
      timepanel.validate();
      for (;;) {
	System.out.println("thread is running");

	sleep(1000);	
	timepanel.setTime();

      }
    }catch (InterruptedException  e) {
      return;
    }
  }


  private TimePanel timepanel;
  private CalendarFrame calendar;
}
