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