void (final Component component) { super.processComponent(component); if (component instanceof EditorComponentImpl) { ((EditorComponentImpl)component).getEditor().getDocument().addDocumentListener(myListener); } }