O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

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

The java.awt.ItemSelectable Interface

Classes that implement the ItemSelectable interface have zero or more items that can be selected, or in the case of checkboxes, checked. We've listed the methods defined in the ItemSelectable interface in Table 13-1. As you can probably gather, classes that implement the ItemSelectable interface fire item events, thus, the item listener registration methods. The ItemListener interface defines one method: void itemStateChanged(ItemEvent). Whenever an item in an ItemSelectable changes state, an item event is fired to all currently registered item listeners.[2]

[2] See “Item Events”.

Table 13-1. java.awt.ItemSelectable Interface
Method Intent
Object[] getSelectedObjects() Returns an array of the currently selected ...

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