// Using the Clock thread in the ClockProg program.
// Barry Cornelius, 21 June 2000
import java.awt.    BorderLayout;
import java.awt.    Container;
import javax.swing. JFrame;
import javax.swing. JTextField;
public class ClockProg
{
   public static void main(final String[] pArgs)
   {
      System.out.println("ClockProg program");
      final JFrame tJFrame = new JFrame("ClockProg program");
      final JTextField tJTextField = new JTextField(35);
      final Container tContentPane = tJFrame.getContentPane();
      tContentPane.add(tJTextField, BorderLayout.CENTER);
      tJFrame.pack();
      tJFrame.setVisible(true);
      final Clock tClock = new Clock(tJTextField, 2000);
      tClock.start();
      for (int tCount = 0; tCount<8 ; tCount++)
      {
         System.out.println("tCount is: " + tCount);
         try
         {
            Thread.sleep(1000);
         }
         catch(final InterruptedException pInterruptedException)
         {
         }
      }
      System.out.println("ClockProg program");
   }
}
