public void handleEvent(Event event) {
        try {
          value = Long.parseLong(text.getText());
          buttonOK.setEnabled(true);
        } catch (Exception e) {
          buttonOK.setEnabled(false);
        }
      }