public boolean handleEvent (Event event) {
    if (event.id == Event.WINDOW_DESTROY ||
        (event.id == Event.ACTION_EVENT && event.target == okayButton) ||
	(event.id == Event.KEY_PRESS && event.key == 0x1b))
    {
      hide();
      return true;
    }
    else return super.handleEvent (event);
  }