the first helloworld with j2me
来源:互联网 发布:java面试题基础 编辑:程序博客网 时间:2024/05/22 16:41
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;
import javax.microedition.lcdui.Form;
public class HelloWorld extends MIDlet implements CommandListener {
private Display display;
private Form form;
private Command command;
public HelloWorld() {
super();
// TODO Auto-generated constructor stub
form = new Form("test");
form.append("Hello World !");
command = new Command("Exit",Command.EXIT,1);
form.addCommand(command);
form.setCommandListener(this);
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
display = Display.getDisplay(this);
display.setCurrent(form);
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void destroyApp(boolean arg0) {
// TODO Auto-generated method stub
form = null;
}
public void commandAction(Command arg0, Displayable arg1) {
// TODO Auto-generated method stub
if(arg0 == command){
destroyApp(true);
notifyDestroyed();
}
}
}
- the first helloworld with j2me
- The First Pro with wxpython
- j2me HelloWorld
- J2ME HelloWorld
- HelloWorld J2ME
- Wireless Programming with J2ME: Cracking the Code
- The first meet with test case
- The first Spring project with Ioc
- the first demo: HelloWorld compiled by masm5.0
- The first face-to-face with the living in London
- J2ME初试 -- HelloWorld
- J2ME例子-HelloWorld
- J2ME入门之HelloWorld
- 精通j2me中的 helloworld
- [转]J2ME MIDP Device Fragmentation Tutorial with Marv The Miner
- CXF-HelloWorld-Java first
- Rolling with Rails 2.0 - The First Full Tutorial - Part 1
- Rolling with Rails 2.0 - The First Full Tutorial - Part 2
- BREW究竟是什么-BREW本质之我见
- 修正VC6.0 ACTIVEX 直接运行不能调用Activex Control Test Container 的问题
- J2ME游戏开发技巧
- test
- 荷,夏日的风景
- the first helloworld with j2me
- 童年十大经典玩耍游戏
- 就快回家啦@_@~~~~哈哈
- Java调用COM的中间件Jintegra初探
- Excel文件格式(MICROSOFT EXCEL FILE FORMAT)
- 06/07/08
- 黑客和信用卡度日
- What is time meaning......
- 设计模式之简单工厂模式