The GameCanvas class is provided in the javax.microedition.lcdui.game package. It extends the Canvas class. It not only inherits the features from the Canvas class but also provides game-specific capabilities such as an off-screen graphics buffer and the ability to query key status. Some of the methods of this class are as follows:
- flushGraphics()
- getGraphics()
- getKeyStates()