Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Automating a Mouse Event

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Automating a Mouse Event

    Hi im working on a program that does certain things when you get to a checkpoint. the things that it would do is mouse activated events. i need to know how i can apply mouse down events in a custom frame i would need to know how i can apply a mouse down event automated when needed. kinda like a macro but doesn't control your mouse. for example

    step 1: locate x && y (input x && y integer)
    step 2: preform invisible mouse click @ (x && y)

    so you clicked on something with out the need of pointing a mouse at the area nor having the mouse move their and still have control over your mouse.

    Code snippet would be very nice.... APIs on mouse events would be nice Help would be very nice...
    would you please help me?


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Automating a Mouse Event

    See MouseInfo API (and indirectly, PointerInfo API) to get the mouse's current location.
    See Java Robot API to control the mouse/keyboard.
    Last edited by helloworld922; December 11th, 2010 at 01:44 AM.

Similar Threads

  1. Menu Event Listeners
    By Gondee in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 16th, 2010, 03:08 PM
  2. [SOLVED] JRadioButton Event Handling Help?
    By CS313e in forum AWT / Java Swing
    Replies: 2
    Last Post: March 27th, 2010, 11:56 AM
  3. jbutton and action event
    By mt888 in forum AWT / Java Swing
    Replies: 3
    Last Post: March 26th, 2010, 06:24 AM
  4. JButton event handling.
    By Prof in forum AWT / Java Swing
    Replies: 6
    Last Post: February 3rd, 2010, 10:29 AM
  5. Event handling
    By subhvi in forum AWT / Java Swing
    Replies: 3
    Last Post: August 26th, 2009, 11:20 AM