void () { JTextComponent component = getComponent(); component.removeFocusListener(handler); component.removeMouseListener(handler); component.removeMouseMotionListener(handler); component.removePropertyChangeListener(handler); handler.uninstallListener(component.getDocument()); }