Java check mouse button state
How can I check the state of the mouse buttons in Java? I cannot use mouse even开发者_Go百科ts, as it involves getting 'mouse released' on an element that has never received 'mouse pressed', so I theoretically could use events if it intercepted mouse events system wide, but that would probably be a security risk. If I can't do this with java, I am happy to write a native interface, and I am developing on Mac 10.6.
Three words:
Global Event Listeners
精彩评论