void () { myNameLabel.setLabelFor(myNameField); myNameField.addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent event) { fireNameDataChanged(); } }); myListenerList.add(DataChangedListener.class, new DataChangedListener()); }