if (c == exitCommand) { // Exit. No need to call destroyApp // because it is empty. notifyDestroyed(); }
if (!started) { display = Display.getDisplay(this); Canvas canvas = new EventsCanvas(); exitCommand = new Command("Exit", Command.EXIT, 0); canvas.addCommand(exitCommand); canvas.setCommandListener(this); display.setCurrent(canvas); started = true; }