code: private void zAddTextChangeListener() {
          dateTextField.getDocument().addDocumentListener(new DocumentListener() {
              @Override
              public void insertUpdate(DocumentEvent e) {
                  zEventTextFieldChanged();
              }
  
              @Override
              public void removeUpdate(DocumentEvent e) {
                  zEventTextFieldChanged();
              }
  
              @Override
              public void changedUpdate(DocumentEvent e) {
                  zEventTextFieldChanged();
              }
          });
      }
docs: zAddTextChangeListener, This add a text change listener to the date text field, so that we
  can respond to text as it is typed.