/* 
 * Copyright (c) 1999-2002, Xiaoping Jia.  
 * All Rights Reserved. 
 */

import java.awt.Color;

/**
 *  This is an ehhanced version of DigitalClock. It takes a parameter: color
 *  It displays the time in the following format:
 *        HH:MM:SS
 */
public class DigitalClock2 extends DigitalClock {

  public void init() {
    String param = getParameter("color");

    if ("red".equals(param)) {
      color = Color.red;
    } else if ("blue".equals(param)) {
      color = Color.blue;
    } else if ("yelow".equals(param)) {
      color = Color.yellow;
    } else if ("orange".equals(param)) {
      color = Color.orange;
    } else {
      color = Color.green;
    }
  }

}
