O'Reilly logo

Micro Java™ Game Development by Roman Verhosek, David Fox

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Working with Graphics: Low-Level Graphical User Interfaces

Let's face facts—graphics are the heart of gaming, and good graphics consist of writing and animating all sorts of images on a device's screen.

The MIDP UI component that supports this low-level approach is the javax.microedition.lcdui.Canvas class. This is the class where all the action happens.

The Canvas Class

Canvas handles low-level events and allows you to draw directly onto the device's display. The Canvas class, just like the Screen class, implements the javax.microedition.lcdui.Displayable interface. Just like a Form, an Alert, or any other type of screen, you can easily create and display multiple Canvas ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required