OOOO!!
Just found another use for low-level processing! (Stole it from Jim Yingst in Advanced)
There is a class called Robot in the AWT. It allows you to "remote control" a GUI and can be used to automate
testing or demonstrations.
From the API:
public class Robot
extends Object
This class is used to generate native system input events for the purposes of test automation, self-running demos, and other
applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing
of Java platform implementations.
Using the class to generate input events differs from posting events to the AWT event queue or AWT components in that the
events are generated in the platform's native input queue. For example, Robot.mouseMove will actually move the mouse cursor
instead of just generating mouse move events.
Note that some platforms require special privileges or extensions to access low-level input control. If the current platform
configuration does not allow input control, an AWTException will be thrown when trying to construct Robot objects. For
example, X-Window systems will throw the exception if the XTEST 2.2 standard extension is not supported (or not enabled) by
the X server.
Applications that use Robot for purposes other than self-testing should handle these error conditions gracefully.
So like you can hook it up to your co-workers GUI and drive him
NUTS!!!
How fun
Got to go. Things to be tested you know . . .
[This message has been edited by Cindy Glass (edited February 28, 2001).]
[This message has been edited by Cindy Glass (edited February 28, 2001).]