Solaris 8 Software Developer Supplement

AWT Enhancements

J2SE 1.3.0 has a new Robot API that is designed to make automated Abstract Window Toolkit (AWT) and Swing testing possible. The Robot API enables code that is written in the Java programming language to generate low-level native mouse and keyboard input events. Because the events are generated at the operating system level, they are indistinguishable from real user input to the rest of the AWT.

Though designed primarily to improve testability, the Robot API also provides other benefits:

J2SE 1.3.0 also has an improved API for printing. The new printing API gives developers an easy mechanism to print the AWT components by using native platform facilities. By using the new API, developers can control properties of a print job such as destination, number of copies, page ranges, page size, orientation, print quality, and more.