Find out if a mouse has been clicked in any other component

I’ve got a set of components with a parent. Hoes this parent I find out if the mouse has been clicked in any components that aren’t it’s children?

You could use a global mouse listener via the Desktop class, or use Component::addMouseListener on the top-level comp in a window to get events for everything inside it.

1 Like