当前位置:学会吧培训频道电脑知识学习网页制作移动WAP开发J2ME学习之二:搭建移动应用开发环境» 正文

J2ME学习之二:搭建移动应用开发环境

[08-08 00:48:43]   来源:http://www.xuehuiba.com  移动WAP开发   阅读:8967
概要: mainForm.append("Welcome to the world of MIDlets!"); Command exitCommand = new Command("Exit", Command.EXIT, 0); mainForm.addCommand(exitCommand); mainForm.setCommandListener(this); display.setCurrent(mainForm); } public void pauseApp () {} public void destroyApp(boolean unconditional) {} public void commandAction(Command c, Displayable s) { if (c.getCommandType() == Command.EXIT) notifyDestroyed(
J2ME学习之二:搭建移动应用开发环境,标签:移动WAP开发教程,wap网站开发,http://www.xuehuiba.com
    mainForm.append("Welcome to the world of MIDlets!");
   
    Command exitCommand = new Command("Exit", Command.EXIT, 0);
    mainForm.addCommand(exitCommand);
    mainForm.setCommandListener(this);
   
    display.setCurrent(mainForm);
  }
  public void pauseApp () {}
 
  public void destroyApp(boolean unconditional) {}
 
  public void commandAction(Command c, Displayable s) {
    if (c.getCommandType() == Command.EXIT)
      notifyDestroyed();
  }
}
 
附件2:EclipseMIDlet.java
 
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
public class EclipseMIDlet extends MIDlet
  implements CommandListener {
  public void startApp() {
    Display display = Display.getDisplay(this);
   
    Form mainForm = new Form("EclipseMIDlet");
    mainForm.append("Welcome to the world of MIDlets!");
   
    Command exitCommand = new Command("Exit", Command.EXIT, 0);
    mainForm.addCommand(exitCommand);
    mainForm.setCommandListener(this);
   
    display.setCurrent(mainForm);
  }
  public void pauseApp () {}
 
  public void destroyApp(boolean unconditional) {}
 
  public void commandAction(Command c, Displayable s) {
    if (c.getCommandType() == Command.EXIT)
      notifyDestroyed();
  }
}

来自:http://blog.csdn.net/cz_hyf/archive/2007/10/12/1822067.aspx

上一页  [1] [2] 


Tag:移动WAP开发移动WAP开发教程,wap网站开发电脑知识学习 - 网页制作 - 移动WAP开发
Copyright 学会吧 All Right Reserved.
在线学习社区!--学会吧
1 2 3 4 5 6 7 7 8 9 10 11 12 13