O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

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

Lists with Multiple Selection

Since the List and Form classes are derived from the Displayable class, the identity of a specific List can be distinguished from that of the Form or another List object by using a selection statement to process the second argument of the commandAction() method. In the ListWithMultipleTest class, the approach to processing messages is simplified somewhat from the approach used in the ListTest class. The emphasis is on bringing messages that relate to the List object to the forefront. This makes it easier to see how the List::getSelectedFlags() method can be used to retrieve an array of all currently selected items in a List object.

The array the getSelectedFlags() method retrieves is of the Boolean type, and after ...

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