Results 1 to 4 of 4

Thread: Using robot

  1. #1
    opiop65 is offline Member
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Default Using robot

    I have a 3D game that I'm creating from scratch, and it uses the mouse to rotate the camera. Right now, if I move the cursor out the window, it will not be able to control the program anymore, obviously. I need to figure out how to prevent it from exiting the window, and keep turning the camera. I think I need to use robot to get the last known position of the mouse and move the mouse there, but I can't find the code for that anywhere. Please help!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,415
    Rep Power
    20

    Default Re: Using robot

    Moved from New to Java.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    opiop65 is offline Member
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Default Re: Using robot

    Sorry thanks:D

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,415
    Rep Power
    20

    Default Re: Using robot

    Right now, if I move the cursor out the window, it will not be able to control the program anymore
    Ever come across MouseInfo / PointerInfo?

    I need to figure out how to prevent it from exiting the window
    That sounds really annoying to the user. But if you have to do this, you're on the right track with Robot. Not to get the last known position of the mouse, but to position the mouse cursor..

    To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates any problem you still have.

    db
    Last edited by DarrylBurke; 04-18-2012 at 07:31 AM.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Robot map
    By Naphoria in forum New To Java
    Replies: 5
    Last Post: 01-16-2012, 05:06 PM
  2. Help with Robot class please
    By davetheant in forum New To Java
    Replies: 2
    Last Post: 01-04-2011, 12:13 PM
  3. Robot
    By rp181 in forum Advanced Java
    Replies: 4
    Last Post: 12-07-2010, 12:58 AM
  4. Robot
    By PhQ in forum AWT / Swing
    Replies: 13
    Last Post: 08-26-2010, 12:10 AM
  5. Robot class
    By coltragon in forum New To Java
    Replies: 6
    Last Post: 07-12-2010, 05:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •