March 2002
Intermediate to advanced
400 pages
8h 44m
English
Undoubtedly, you noticed that the canvas in Figure 6.2 was blank except for the Exit soft button. The reason is that the Canvas1 class doesn't define its visual representation. All concrete subclasses of Canvas must define their look in order to render any visual attributes. They must enlist the help of the javax.microedition.lcdui.Graphics class to do so. The very purpose of the Graphics class is to support drawing on canvases.
The Graphics class defines low-level graphics drawing capabilities. If you've already done AWT or Swing development, this class will look very familiar. In fact, its features and API are almost identical to, albeit a subset of, those in the J2SE Graphics class.
The Graphics class defines ...
Read now
Unlock full access