title: how to obtain mouse click coordinates outside my window in Java
body: <p>I need to implement a class, using Swing, which can obtain the mouse coordinates when the user clicks anywhere on the screen. if I wanted to obtain the mouse coordinates inside my own window, I'd use a <code>MouseListener</code>, but I want it to work even when the user clicks outside my program.</p>
  
  <p>I want my class to behave just like <a href="http://www.kde.org/applications/graphics/kcolorchooser" rel="noreferrer">KColorChooser</a>: the user clicks on the drop button and he can click anywhere on the screen to obtain the color of that spot. but I don't know if that's possible using pure Java.</p>