Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Screen Capture With Mouse , Mouse Position Capture

Reply
Thread Tools

Screen Capture With Mouse , Mouse Position Capture

 
 
Max
Guest
Posts: n/a
 
      02-19-2004
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


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      02-19-2004
Max wrote:
> 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 ?


I think because it is usually not wanted.

> Any Workaround ?


Draw it.

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology


 
Reply With Quote
 
 
 
 
Max
Guest
Posts: n/a
 
      02-19-2004
> 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


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      02-19-2004
Max wrote:
>> Draw it.

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


..hhmmm. Scrying, maybe?
http://directory.google.com/Top/Soci...ity/Divination
/Scrying/

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

> 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 .


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

Anybody?

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology


 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      02-19-2004
Ah ah ah )


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


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 !

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


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

> Anybody?


Anybody ) ?


max


 
Reply With Quote
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      02-20-2004
Max wrote:
> Very thanks , I have try to find it but never class allow my to "get" mouse
> position .


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

 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      02-20-2004
> 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.



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


 
Reply With Quote
 
xgme xgme is offline
Junior Member
Join Date: Aug 2009
Posts: 1
 
      08-08-2009
Use MouseInfo class
MouseInfo.getPointerInfo().getLocation() will return a point object of where the current cursor is located on the screen.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse position relative to screen MAB Java 31 05-13-2009 02:33 AM
determine the mouse cursor position without mouse event tom arnall Java 6 01-18-2007 07:27 PM
detecting mouse click position in canvas tag has position off James Black Javascript 0 05-28-2006 03:27 AM
capture mouse position on Image Jay Javascript 4 01-11-2005 07:43 AM
OT: Position Mouse Cursor in centre of screen Slarty Bartfast MCSE 11 10-08-2003 06:49 PM



Advertisments