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 ...

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.