public static void onMousePressed(Component component, final P1<Point> action) {
        component.addMouseListener(new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                if (e.getButton() == MouseEvent.BUTTON1) {
                    action.e(e.getPoint());
                }
            }
        });
    }