Screen Capture With Mouse , Mouse Position Capture

Screen Capture With Mouse , Mouse Position Capture

Post by Max » Sat, 21 Feb 2004 00:39:02


Hi all ,
in order to capture screen shot of desktop ad store in jpg file I have used
Robot Class .

The Robot Class , allow me to capture desktop but the Mouse isn't present in
the JPG : Why ?

Any Workaround ?

max
 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Andrew Tho » Sat, 21 Feb 2004 00:51:12


I think because it is usually not wanted.


Draw it.

 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Max » Sat, 21 Feb 2004 00:57:57

> Draw it.

Ok ,
but in witch way i can get the Mouse Position (X,Y) over the screen ?

I can get the Mouse Position if the mouse is over the component ,
but when the mouse is outside the component (outside the applet , example)
I do not know the position .

Any Workaround ?

max
 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Andrew Tho » Sat, 21 Feb 2004 01:25:34


.hhmmm. Scrying, maybe? ;-)
http://www.yqcomputer.com/
/Scrying/

Or maybe you could become heavy handed,
since you are using the Robot, and use
mouseMove().. :-/


I am sure there is a way to get
mouse postion any time you want
it, but cannot remember it...

Anybody?
 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Max » Sat, 21 Feb 2004 01:36:47

Ah ah ah :-))



is not possible that I can SET mouse position with ROBOT class ,
but I can't "get" the mouse position !

Naaa, I can't understand that isn't possibile !


Very thanks , I have try to find it but never class allow my to "get" mouse
position .


Anybody :)) ?


max
 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Thomas Wei » Sat, 21 Feb 2004 17:21:42


AFAIK added in the upcoming Java 1.5. Until then, every mouse event
contains the mouse position. You can use the methods in SwingUtilities
to calculate relative/absolute positions from this data.

/Thomas
 
 
 

Screen Capture With Mouse , Mouse Position Capture

Post by Max » Sat, 21 Feb 2004 18:15:04

> AFAIK added in the upcoming Java 1.5. Until then, every mouse event


OK ,
but the MouseEvent is generated if and only IF the mouse is over an
component .
When the mouse is outside a component (applet, example...) Mouse Event isn't
generated : it's right ?

max