I have a simple program that takes a mouse click ActionEvent
and for each occurence, adds one to an integer which is displayed in the console. Currently, the window must be in focus and you have to click on it for it to do anything. How can I remove the need for the frame and the console output and have it run as a background process, as so you would not require focus?
Asked
Active
Viewed 547 times
1

IHazABone
- 525
- 2
- 6
- 20
-
What would you click on then? – tbodt Sep 28 '13 at 21:28
-
If you need to do something native to the system maybe another tool/language could be easier. I don't know exactly what you are trying to do, the console will not trigger if you don't launch it, maybe Robot class help you. – porfiriopartida Sep 28 '13 at 21:30
-
1http://stackoverflow.com/search?q=%5Bjava%5D+detect+mouse+click+anywhere – assylias Sep 28 '13 at 21:32
-
See also http://stackoverflow.com/questions/2419555/how-to-obtain-mouse-click-coordinates-outside-my-window-in-java – assylias Sep 28 '13 at 21:33
-
1And http://kra.lc/blog/2011/07/java-global-system-hook/ – assylias Sep 28 '13 at 21:38