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

📄 main.java

📁 这是我第一次开始尝试J2ME平台的程序编写
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;;

public class Main extends MIDlet implements CommandListener{
	protected CanvasTest ct;
	protected Display display;
	protected TextBox tb;
	protected Command exitCommand = new Command("Exit",Command.EXIT,1);
	public Main() {
		super();
		// TODO 自动生成构造函数存根
	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO 自动生成方法存根
		tb = new TextBox(null,"asdfasdf",10,TextField.ANY);
		ct = new CanvasTest();
		ct.addCommand(exitCommand);
		ct.setCommandListener(this);
		display = Display.getDisplay(this);
		display.setCurrent(ct);
	}

	protected void pauseApp() {
		// TODO 自动生成方法存根

	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO 自动生成方法存根

	}
	public void commandAction(Command c,Displayable d){
		if(d == ct && c == exitCommand){
			try{
				destroyApp(false);
			}
			catch(Exception e){}
			notifyDestroyed();
		}
	}
}

⌨️ 快捷键说明

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