I would like to print component coordonate on which the user is clicking. I can not modify the interface (consider it as part of an external module). I need to plug my code at runtime.
So far I have wrote a snippet to add a MouseClickListener that is adding a action performed to display the X and Y, and I iterate on every component to add it. This is not ideal, I need to call the code regularly to add a listener to new instantiated container. This is plainful to handle.
Would there be other solution like agent or maybe intercept AWT events ?