Name
Package javax.microedition.lcdui
Synopsis
This package, whose class hierarchy is shown in Figure 15-1, contains the user interface classes for the Mobile Information Device Profile.
Each MIDlet is associated with an instance of the Display class,
which represents the MIDlet’s view of the screen. At any given time, at most one
MIDlet has access to the actual screen and the keyboard and pointer, if the device
has them. This MIDlet is said to be in the foreground. While
a MIDlet is in the foreground, the content of its Display object
will be visible to the user and any changes to it will be seen some time after
they are made.
A Display shows an object derived from the abstract class
Displayable, of which there are two types:
Screen and Canvas.
Screen is a base class for a set of form-based screens that
are part of the the high-level user interface API, while
Canvas is a drawing surface for the
low-level API.
The high-level API provides a set of components, derived from
the Item class, that allow the construction of simple user interfaces containing text fields, check boxes, radio buttons and lists. Since the range of devices for which MIDP is intended has a wide variety of input and output capabilities, these classes deliberately provide a programming interface that hides the details of the platform itself and very little customization of the appearance of these components is possible. In particular, it is not possible to change the colors or fonts used to render these components. ...
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