Chapter Summary
Two classes in the javax.microedition.lcdui package make up the definition of the MIDP low-level API: the Graphics class and the Canvas class. The MIDP low-level API enables your application to obtain information about low-level events that aren't available to the high-level API components. Canvas objects can obtain information on keystroke events and pointer motion events. Canvas objects are Displayable objects. For this reason, they can still perform command processing like other Displayable components.
To use the low-level API, you must create a subclass of Canvas. You must then define a paint(Graphics g) method in your subclass in order to produce the visible look of its instances. The subclass's paint(Graphics g) method defines ...
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