Java Reference
In-Depth Information
return super.contains(x, y);
}
};
button.setToolTipText("Hello, World");
frame.add(button, BorderLayout.NORTH);
frame.setSize(300, 150);
frame.setVisible(true);
}
};
EventQueue.invokeLater(runner);
}
}
You'll see the screen shown in Figure 22-3. If you don't immediately see the component
tree, select the Refresh Tree option under the File menu in the Java Monkey window.
Figure 22-3. Main Java Monkey screen
Select the Accessibility API Panel option under the Panels menu to see the information
available through the AccessibleContext , such as the name, description, and role. Figure 22-4
shows an example. Be sure to scroll down to see all the available information.
Figure 22-4. Secondary Java Monkey screen
The other program that comes with the Java Access Bridge is Java Ferret. This is more of a
tracking program, where you can enable the tracking of different events, such as mouse, focus, and
menu selection. If you've enabled mouse tracking, you'll see the program updated. Figure 22-5
shows an example of the Java Ferret information displayed when you move the mouse over the
JButton in the sample tooltip program (Listing 22-1).
Search WWH ::




Custom Search