doc.addDocumentListener(documentHandler);
doc.addDocumentListener(handler);
  public void installUI(final JComponent c)  {    textComponent = (JTextComponent) c;    installDefaults();    textComponent.addPropertyChangeListener(updateHandler);    Document doc = textComponent.getDocument();    if (doc == null)      {	doc = getEditorKit(textComponent).createDefaultDocument();	textComponent.setDocument(doc);      }    else      {        doc.addDocumentListener(documentHandler);    modelChanged();      }    installListeners();    installKeyboardActions();  }