Screen Capture With Mouse , Mouse Position Capture

Discussion in 'Java' started by Max, Feb 19, 2004.

  1. Max

    Max Guest

    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
    Max, Feb 19, 2004
    #1
    1. Advertising

  2. 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
    Andrew Thompson, Feb 19, 2004
    #2
    1. Advertising

  3. Max

    Max Guest

    > 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
    Max, Feb 19, 2004
    #3
  4. 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/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?

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Feb 19, 2004
    #4
  5. Max

    Max Guest

    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
    Max, Feb 19, 2004
    #5
  6. 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
    Thomas Weidenfeller, Feb 20, 2004
    #6
  7. Max

    Max Guest

    > 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
    Max, Feb 20, 2004
    #7
  8. Max

    xgme

    Joined:
    Aug 9, 2009
    Messages:
    1
    Use MouseInfo class
    MouseInfo.getPointerInfo().getLocation() will return a point object of where the current cursor is located on the screen.
    xgme, Aug 9, 2009
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russell
    Replies:
    1
    Views:
    367
    Steve C. Orr [MVP, MCSD]
    Jan 21, 2004
  2. MAB
    Replies:
    31
    Views:
    26,902
    chrisbster
    May 13, 2009
  3. tom arnall
    Replies:
    6
    Views:
    1,262
    Ian Shef
    Jan 18, 2007
  4. Jay

    capture mouse position on Image

    Jay, Jan 4, 2005, in forum: Javascript
    Replies:
    4
    Views:
    116
  5. James Black
    Replies:
    0
    Views:
    393
    James Black
    May 28, 2006
Loading...

Share This Page