See when a mousebutton is clicked without adding mouselisteners to all components
===

I have a JFrame with a lot of subcomponents and subpanels with different functions. I have added mouseListeners to some of them.

I want to be able to call a function when a mousebutton is clicked in the frame, regardless of what component is at focus. I dont want to add mouselisteners to all of the components. Much like keyEventDispacher, I am useing it for the keyboard.

I have looked at this http://stackoverflow.com/questions/2708408/dispatch-mouseevent but I wasn't able to work it out. Could anyone give me a small example to demonstrate how it works?