Screens and Screen Elements

The first example in this chapter shows you the fundamental difference between the two types of MIDP UI components: Displayable components and Item components. The inheritance hierarchy of Figure 5.1 clearly delineates these two categories. The Displayable hierarchy encompasses screens, which you display. The Item hierarchy classifies elements that can be aggregated within a screen. The ensuing examples demonstrate the use of the various MIDP UI components. We explain their use as we introduce each one.

Listing 5.1 shows the file named UIComponentDemo.java, which defines the source code of a new program that demonstrates the use of the MIDP widgets. This file uses code in other files that together comprise the complete ...

Get Wireless J2ME™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.