java - capture mouse event from standalone java app
I want to capture Mouse Event outside the standalone ja开发者_如何学编程va application. Can anybody point me where to get some sample?
I have found examples showing how to capture mouse events inside JFrame or JPanel. I would like to capture any mouse or keyboard event after the standalone java application starts.
Thanks.
You will only recieve mouse and keyboard events when your application is in focus, and for the appropriate component. You will have to use a platform specific API for retrieving all mouse and keyboard events (read, JNI).
精彩评论