public void commitOrRevert() {
    switch (focusLostBehavior) {
    case JFormattedTextField.REVERT:
      revertEdit();
      break;
    case JFormattedTextField.COMMIT:
      commitEdit();
      break;
    case JFormattedTextField.COMMIT_OR_REVERT:
      if (!commitEdit())
        revertEdit();
      break;
    case JFormattedTextField.PERSIST:
      // do nothing
      break;
    }
  }
public void commitOrRevert()