Java: Add a Global Mouse Listener

亡梦爱人 提交于 2019-12-31 03:21:28

问题


I am developing a virtual keyboard using java applet. How do I set global mouse listener, so that I can get all mouse events inside my applet even if my applet is not the active window. And is there any way to get the focussed textbox globally, so that I can feed input to that textbox from my virtual keyboard. Thanks.


回答1:


You need to make a hook for that you need native code for windows machine take a look here



来源:https://stackoverflow.com/questions/4673061/java-add-a-global-mouse-listener

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!