| Posted in JAVA技术 | 2007/09/24 11:55 by 博爱老头 | Comments (0) | Views 989
     java里面,经常看api的人不难发现,在java.awt包下,有个非常有意思也有用的类Robot!它可以模拟键盘和鼠标的一切动作,看看huachitypying
     原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.
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]