O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How Does Accessibility Work?

An assistive technology needs an entry point into a GUI before it can examine the state of each component. Java's accessibility framework specifies this entry point by enforcing the rule that each component's class implement the Accessible interface. For example, the JButton class implements Accessible.

The Accessible interface presents a getAccessibleContext method. When called, this method returns an object whose class implements the AccessibleContext interface. (Each component class contains an inner class that implements AccessibleContext.) After an assistive technology has this object, it can call various methods to learn more about the component. For example, after a JButton object has been created, an assistive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required