public static void main (String[] args) {
    int n = 8;
    int size = 500;
    String t = "cs671.UtilClockTimer";//Clock.DEFAULT_TIMER_CLASS;
    String p = null;
    try {
      if (args.length > 0) n = Integer.parseInt(p = args[0]);
      if (args.length > 1) size = Integer.parseInt(p = args[1]);
      if (args.length > 2) t = args[2];
      if (n < 1) {
        System.err.println("not enough bits, using 1");
        n = 1;
      }
      if (size < 150) {
        System.err.println("size is too small, using 150");
        size = 150;
      }
      assert n >= 1; // so only t can be a problem
      final ClockApplication app = new ClockApplication(new Clock(n, t), size);
      javax.swing.SwingUtilities.invokeLater(new Runnable() {
          public void run () {
            app.init();
            // one or both of the following can be commented out for debugging
            //app.debug();
            //app.clock.start();
          }
        });
    } catch (NumberFormatException e) {
      System.err.printf("cannot parse '%s' as a number%n", p);
      usage();
    } catch (IllegalArgumentException e) {
      System.err.printf("cannot create timer: %s%n", e.getMessage());
      usage();
    }
  }