void (@NotNull Component component) { component.addMouseListener(myMouseHandler); component.addMouseMotionListener(myMouseHandler); component.addKeyListener(myKeyListener); component.addFocusListener(myFocusListener); }