EDIT: Nvm im a dummy, addMouseListener(this, true) does the trick
I have a component which basically looks/feels like a dialog, and I would like to be able to close it (hide it) when a user clicks outside of the component. What is the simplest way to do this? I have various mouseDown methods in a bunch of components, and I don’t want code spread all over the place to catch differeent mouseDown events on different components to be able to do this.
Is the only option ensuring that I have addMouseListener to every child component and sub-component in the editor to ensure that I can get an event at the editor level no matter where the user clicks?
Any help is appreciated!