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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access