void (@NotNull Component component) { if (!(component instanceof JComponent)) { throw new IllegalArgumentException("JComponent expected"); } super.installOn(component); component.addMouseListener(new MouseAdapter() { @Override public void mouseExited(MouseEvent e) { JComponent component = (JComponent)e.getSource(); Object tag = ComponentUtil.getClientProperty(component, ACTIVE_TAG); if (tag != null) { ComponentUtil.putClientProperty(component, ACTIVE_TAG, null); repaintComponent(e); } } }); }