pyramidMIDlet.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- import javax.microedition.midlet.*;
- import javax.microedition.lcdui.*;
- import javax.microedition.lcdui.game.*;
- import javax.microedition.m3g.*;
- public class pyramidMIDlet extends MIDlet implements CommandListener{
- private Command ExitCommand;
- private Display d;
- private pyramidCanvas myCanvas;
- public pyramidMIDlet(){
- d = Display.getDisplay(this);
- ExitCommand = new Command("Exit", Command.EXIT, 0);
- myCanvas = new pyramidCanvas();
- myCanvas.addCommand(ExitCommand);
- myCanvas.setCommandListener(this);
- }
- public void startApp() {
- d.setCurrent(myCanvas);
- }
- public void pauseApp() {
- }
- public void destroyApp(boolean unconditional) {
- }
- public void commandAction(Command c, Displayable d){
- notifyDestroyed();
- }
- }