• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Alternate mouse control

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.awt.Robot class can be used to control mouse pointer. Please check.
 
Tejas Bondre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic