⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examplegamecanvasmidlet.java

📁 J2ME的源码!我以前学习J2ME的源码哈!非常适合初学者
💻 JAVA
字号:
package TestSprite;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class ExampleGameCanvasMIDlet extends MIDlet implements CommandListener{
	private ExampleGameSprite gameCanvas;
	//private Command exitcmd=new Command("Exit",Command.SCREEN,1);
	public ExampleGameCanvasMIDlet(){
		gameCanvas=new ExampleGameSprite();
		//gameCanvas.addCommand(exitcmd);
		//gameCanvas.setCommandListener(this);
		
	}

	protected void destroyApp(boolean arg0) {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		gameCanvas.start();
		Display.getDisplay(this).setCurrent(gameCanvas);
		

	}

	public void commandAction(Command c, Displayable d) {
		//if(c==exitcmd){
			//destroyApp(false);
			//notifyDestroyed();
		//}
		
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -