clearButton.setActionCommand("clearButton");
clearButton.addActionListener(this);
deleteButton.setActionCommand("deleteButton");
deleteButton.addActionListener(this);
TextListener nameListener = new TextListener() {
public void somethingHappened(DocumentEvent event) {
checkButtonStatus();
}
};
title.getDocument().addDocumentListener(nameListener);