// Lars Sorensen TYJava in 21 days // excode from pg 181, the fixed digital clock using threads // // Things are starting to get interesting.... // import java.awt.Graphics; import java.awt.Font; import java.awt.Color; import java.util.Date; public class DigitalThreads extends java.applet.Applet implements Runnable { Font theFont = new Font("TimesRoman", Font.BOLD, 24); Date theDate; Thread runner; public void start() { if (runner == null ) { runner = new Thread(this); runner.start(); } } // end of start public void stop() { if (runner != null ) { runner.stop(); runner = null; } } // end of stop public void run() { while(true) { theDate = new Date(); repaint(); try { Thread.sleep(1000); } catch (InterruptedException e) { } } } // end of run public void paint(Graphics g) { g.setFont(theFont); g.setColor(Color.red); g.drawString(theDate.toString(), 10, 50); } // end of paint } // end of class DigitalThreads...