public static ControlValueAccessor textFieldAccessor(final JTextField from) {
    return new ControlValueAccessor<String>() {
      @Override
      public String getValue() {
        return from.getText();
      }

      @Override
      public void setValue(String value) {
        from.setText(value);
      }

      @Override
      public Class<String> getType() {
        return String.class;
      }

      @Override
      public boolean isEnabled() {
        return from.isEnabled();
      }

      @Override
      public void addChangeListener(final Runnable listener) {
        from.getDocument().addDocumentListener(new DocumentAdapter() {
          @Override
          protected void textChanged(@NotNull DocumentEvent e) {
            listener.run();
          }
        });
      }
    };
  }
public static ControlValueAccessor textFieldAccessor(final JTextField from)