O'Reilly logo

LWUIT 1.1 for Java ME Developers by Biswajit Sarkar

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 ComboBox

A ComboBox represents a combination of a list and a button. Normally, only the selected item is visible. Clicking on the button makes the entire list visible in a (usually) drop-down format, from which an item can be selected. The ComboBox class extends List, and the flexible rendering model of a list is applicable to it. A combo box is good for optimum use of screen real estate, because only one item of the underlying list needs to be drawn on the screen, except when a selection is being made.

Creating a ComboBox

A ComboBox has four constructors which are just like those of List. Whenever we want to instantiate a combo box, we first need to define, as an array or a vector, the set of items that will form the list for the combo box ...

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