public DisplayHack (String [] args, boolean clear, boolean erase,
    boolean rainbow_color, int default_color_count, int default_delay) {

    super (args);
    this.clear = clear;
    this.erase = erase;

    int color_count = option.intt ("color-count", 
      "total number of random colors", default_color_count);
    delay = option.longg ("delay",
      "delay between screens in ms", default_delay);

    if (erase) {
      eraser_delay = option.longg ("eraser-delay", 
        "delay between iterations of eraser in ms", 10);
      eraser_delta = option.intt ("eraser-delta",
        "granularity of eraser", 5, 1, 10);
      eraser_mode = option.enumerate ("eraser-mode",
        "which eraser", Eraser.ALL_STRINGS, 
        Eraser.RANDOM_ERASER_INDEX);
    }

    Rectangle geometry = option.rectangle ("geometry", 
      "initial geometry of main window",
      new Rectangle (10, 10, 600, 480));

    if (help_option) return;

    gc = GC.build (display);
    if (erase) eraser_gc = GC.build (display);


    colors = new Color [color_count];

    if (rainbow_color)
      for (int i=0; i<color_count; i++)   
        colors [i] = display.default_colormap.
          alloc_random_rainbow_color (random);

    else
      for (int i=0; i<color_count; i++)   
        colors [i] = display.default_colormap. alloc_random_color (random);


    Window.Attributes win_attr = new Window.Attributes ();
    win_attr.set_background (display.default_black);
    win_attr.set_event_mask (Event.BUTTON_PRESS_MASK
      | Event.STRUCTURE_NOTIFY_MASK 
      | Event.EXPOSURE_MASK | Event.KEY_PRESS_MASK);
    window = new Window (display.default_root, geometry, 0, win_attr);

    window.set_wm (this, "main");
    window.set_wm_delete_window ();
  }