View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Robot class Control functions

    by , 03-04-2012 at 11:46 AM
    Robot class uses these control functions:

    Mouse control functions

    void mouseMove(int x, int y):To coordinate (x,y), mouse cursor is moved by using this function. At screen’s top corner (left), coordinated are shown.
    Java Code:
    void mousePress(int buttons)
    void mouseRelease(int button)
    Button clicks are performed by this function pair. Input arguments are as following:
    java.awt.event.InputEvent.BUTTON1_MASK   // left mouse button 

    Updated 03-04-2012 at 12:07 PM by Java AWT

  2. Robot Class

    by , 03-04-2012 at 11:42 AM
    In many applications, like self running demos or test automation, the Robot class is used. It is required in those circumstances where keyboard control as well as mouse is needed. “Native system” input events are generated by the class robot. The basic purpose is to facilitate the Java platform’s automated testing implementations.

    Generation of the input events by the Robot class is totally a separate thing as compared to the posting of the events to AWT components or event queue. ...
    Tags: robot class Add / Edit Tags