This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting the cursor position

 
niklas aronsson
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I write to the cursor position without
generating mouse events?
I have tried using the Robot-class, which can generate mouse events, but if there are queued mouse movement events, I have problems detecting
which event not to process.
Is it perhaps possible to let my mouseMoved()-method force an mouse move event to be processed
before those in the queue?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just requestFocus() for the component that you want.
Or are you trying to accomplish something else?
 
niklas aronsson
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to set the cursor position!
It is possible to do so with the Robot-class method: moveMouse( x,y), but it generates AWT-events.
I have found a way to get around the event-problems, so I'll settle for using the Robot-class, since I now assume there isn't any way to directly setting the cursor position.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic