static A onHover(IVF1 action, A c) { if (c != null && action != null) swing { MouseAdapter ma = new MouseAdapter { public void mouseMoved(MouseEvent e) { pick(e); } public void mouseEntered(MouseEvent e) { pick(e); } public void mouseExited(MouseEvent e) { pick(null); } void pick(MouseEvent e) pcall { action.get(ptFromEvent(e)); } }; c.addMouseMotionListener(ma); c.addMouseListener(ma); } ret c; } static A onHover(A c, IVF1 action) { ret onHover(action, c); }