The AWT Monitor allows you to obtain information about AWT objects being displayed on the screen by a particular Java Virtual Machine. It does not require the JFC Early Access Release to run.
For those interested in detail on the additional accessibility features of the JFC Early Access Release, we recommend using the Java Monitor instead of the AWT Monitor. The Java Monitor provides all the capabilities of the AWT Monitor, but also has additional support for the JFC classes.
The AWT Monitor class is in the examples/AWTMonitor directory included with this release of Java Accessibility (click here to view the source). Before you can run it, you need to set up your environment appropriately by following these instructions:
Modify your CLASSPATH environment variable so the jaccess.jar (e.g., jaccess-0.5/jaccess.jar or jaccess-0.5\jaccess.jar) file that comes with this pre-release kit is included in the path. Modify your CLASSPATH environment variable so the AWTMonitor directory (e.g., jaccess-0.5/examples/AWTMonitor or jaccess-0.5\examples\AWTMonitor) are included in the path. Modify your $JDKHOME/lib/awt.properties file (e.g., jdk1.1.2/lib/awt.properties or C:\jdk1.1.2\lib\awt.properties) to include the following lines: AWT.EventQueueClass=com.sun.java.accessibility.EventQueueMonitor AWT.AutoLoadClasses=AWTMonitor
After you follow these instructions, you should be ready to run the AWT Monitor. If you did not set up your CLASSPATH correctly you might get one of the following errors when running a java application:
Failed loading com.sun.java.accessibility.EventQueueMonitor: java.lang.ClassNotFoundException: com.sun.java.accessibility.EventQueueMonitor
Error trying to newInstance AWTMonitor java.lang.ClassNotFoundException: AWTMonitor
The first error means the jaccess.jar file is not in your CLASSPATH, and the second means the AWTMonitor directory is not in your CLASSPATH.
By following the instructions above, the AWT Monitor will automatically be started any time you start a java application in a virtual machine.
The AWT Monitor provides a several rows of checkboxes at the top of its dialog box. These allow you to specify the classes of user interface events you can monitor in the Java Virtual Machine. AWT Monitor registers an interest in the events by using calls to the AWTEventMonitor class from the Java Accessibility package whenever you click one of the checkboxes.
In the middle of the dialog box is a List of events that is updated as each event occurs. Items will be posted in this List only if you selecting the events you are interested in by manipulating the checkboxes at the top of the box.
In the bottom left of the dialog box is a small List box that represents the last object to have focus. It is updated each time the focus changes and contains a small sample of the information obtained from interface Accessible. NOTE: This box will not be updated unless you select for Focus events.
In the lower right of the dialog box is a small List box that you can populate by moving the pointer over an object and pressing the F1 key. This uses calls to EventQueueMonitor to obtain the current mouse position and obtain an accessible object from that point. It then calls a small number of methods from interface Accessible to display information about the object under the pointer. NOTE: This box will not be updated unless you select for key events.
NOTE: This is a preliminary release of Java Accessibility. We reserve the right to modify the specification in future versions.