/* this example demostrates a simple game application using Game API This example is modified version of a sample code in Riggs R. et al book Chapter 12 */ import javax.microedition.lcdui.*; import javax.microedition.midlet.*; import java.io.*; public class Example171 extends MIDlet{ ExampleGameCanvas mGameCanvas; // constructor public Example171() throws IOException { mGameCanvas = new ExampleGameCanvas(); } /* startApp set the current display to the GameCanvas */ protected void startApp() { try { Display display = Display.getDisplay(this); mGameCanvas.start(); display.setCurrent(mGameCanvas); } catch (IOException ioe) { } } // pauseApp protected void pauseApp(){ } // destroyApp protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { } } // Create the ExampleGameCanvas subclass for the simple game