Screen Capture With Mouse , Mouse Position Capture

M

Max

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
 
A

Andrew Thompson

Max said:
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.
 
M

Max

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
 
A

Andrew Thompson

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

..hhmmm. Scrying, maybe? ;-)
http://directory.google.com/Top/Society/Religion_and_Spirituality/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?
 
M

Max

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 :)) ?


max
 
T

Thomas Weidenfeller

Max said:
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
 
M

Max

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
 
Joined
Aug 9, 2009
Messages
1
Reaction score
0
Use MouseInfo class
MouseInfo.getPointerInfo().getLocation() will return a point object of where the current cursor is located on the screen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top