Re: Java - Get current cursor style
Originally Posted by
PaulM1985
Hi
I am working on a Java program which is designed to show the screen of another computer. I am able to get a screen shot using the java.awt.Robot class, but I am wondering how I get the cursor to be displayed.
As an alternative, if I could get the cursor style on the other computer, I could set this to be the cursor style on the client.
Any ideas?
Paul
It's unclear to me whether you want the user to interact with the cursor or just get the cursor to be painted upon the screenshot, or set user's cursor and move it according to the cursor from the remote computer. or something else..
Anyway, you have to tools to get the cursor type:
java.awt.Cursor.getType()
and to get its coords relative to the screen:
java.awt.MouseInfo.getPointerInfo().getLocation()
That would be enough for me to work my way out.
Last edited by t1497f35; January 7th, 2011 at 03:32 PM.
Your ads here, just 9.99$/week !!
Bookmarks