File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Alternate mouse control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Alternate mouse control" Watch "Alternate mouse control" New topic
Author

Alternate mouse control

Tejas Bondre
Greenhorn

Joined: Nov 29, 2010
Posts: 3
I have a java program that outputs X-Y co-ordinates in the form of a file and in the form of a stream. A new co-ordinate is obtained 16 times every second. I need to control my mouse pointer using these co-ordinates so that i wouldn't have to use the regular mouse. Please give some hints how to approach this problem. Would I need to study the device driver for mouse? Or is there a simpler way using swing/awt/applet APIs? Thank You.
Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
java.awt.Robot class can be used to control mouse pointer. Please check.


Good, Better, Best, Don't take rest until, Good becomes Better, and Better becomes Best.
Sidd : (SCJP 6 [90%] )
Tejas Bondre
Greenhorn

Joined: Nov 29, 2010
Posts: 3
Thank you very much. That's exactly what i wanted.
One more question - how could i have found that on my own?
Siddhesh Deodhar
Ranch Hand

Joined: Mar 05, 2009
Posts: 118
One more question - how could i have found that on my own?


I guess you should have goggled "Controlling mouse using java"
I had worked with Robot class few years back. So remembered it instantly.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alternate mouse control