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

📄 mb.java

📁 非富多彩的十六个J2ME的例子
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class MB extends MIDlet implements CommandListener
{
	private Display dis;
	private Form frm;
	private Command cmdexit;
  public MB()
  {
  	dis=Display.getDisplay(this);
  	frm=new Form("MB");
  	StringItem str=new StringItem("hello word","");
  	frm.append(str);
  	cmdexit=new Command("Exit",Command.OK,0);
  	frm.addCommand(cmdexit);
  	frm.setCommandListener(this);
  }	
  
  public void commandAction(Command c, Displayable d)
  {
  	if(c==cmdexit)
  	   destroyApp(true);
  	
  } 
 
  
  public void startApp() throws MIDletStateChangeException
  {
  	dis.setCurrent(frm);
    	
  }
  
  public void destroyApp(boolean unconditional) 
  {
     notifyDestroyed();	
  }
  public  void pauseApp() 
  {} 
 
}

⌨️ 快捷键说明

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