first: we know that we can get co-ordinates of mouse pointer through functions in like int a=getX();(for getting x co.) similarly i wanna know that can we set mouse pointer to particular point via any function call.please help me.
second: we know that when we press mouse button certain event is generaated which is passed to operating system . simillarly can we generate that event by ourself(expl), that is without clicking the mouse but generating that event. help me to solve my problems thanks in advance bye
Amit
University of Florida
Steven Bell
Ranch Hand
Joined: Dec 29, 2004
Posts: 1071
posted
0
Look at the java.awt.Robot class. It has methods to move the mouse, generate mouse and keyboard events, move the mouse around, screen capture, etc...
Shyam Prasad Murarka
Ranch Hand
Joined: May 02, 2005
Posts: 209
posted
0
Dear Steven, While you posted this reply I was going through MouseEvent's API. I came across a method translatePoint(int x, int y). What is it used for? I didn't understand what they explained. It sounded something like changing the mouse position. Please explain.
With Best Regards,
Shyam Prasad Murarka
Ernest Friedman-Hill
author and iconoclast
Marshal