Results 1 to 2 of 2
  1. #1
    Alexis is offline Member
    Join Date
    Nov 2010
    Posts
    19
    Rep Power
    0

    Default Move mouse beyond screen limits

    My screen resolution is 1600x900

    I need to get mouse position continuously.
    Java Code:
    while(true) {
    			Point p = MouseInfo.getPointerInfo().getLocation();
    			System.out.println("x " + p.getX() + " " + "y "+ p.getY());
    		}
    Also i need to move mouse outside of screen limits.
    For example. Is that posible to move mouse cursor at point 2000x600 ??

    Thank you in advance

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,203
    Rep Power
    12

    Default Re: Move mouse beyond screen limits

    If you want to get the mouse location continuously you should use a mouse listener. If you use the Robot class you can get mouse information outside of the Java windowing system but as far as I know are limited to the physical screen size.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. New to Java, cant get on screen object to move.
    By JWallace in forum New To Java
    Replies: 10
    Last Post: 08-18-2016, 08:43 PM
  2. Ball Move to mouse not animating.
    By Jossos in forum New To Java
    Replies: 6
    Last Post: 01-05-2012, 01:42 PM
  3. RNG Used To Move Mouse
    By alexburkee in forum New To Java
    Replies: 5
    Last Post: 12-11-2011, 11:36 PM
  4. how to move an image automatically without using mouse
    By saranyabaskaran in forum New To Java
    Replies: 6
    Last Post: 03-19-2011, 10:00 AM
  5. Move from one screen fto other screen
    By jprgmr75 in forum CLDC and MIDP
    Replies: 0
    Last Post: 01-02-2011, 06:32 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
  •