[color=green]附件为J2ME所有源码[/color]
[img]http://dl.iteye.com/upload/picture/pic/122328/420c4cab-e498-35e5-94fa-d33fb0da3a79.jpg[/img]
[img]http://dl.iteye.com/upload/picture/pic/122310/89aea4de-a101-364b-a48a-4b699968e690.jpg[/img]
[img]http://dl.iteye.com/upload/picture/pic/122312/782ed010-87e7-3e63-8205-353cd716e81a.jpg[/img]
[img]http://dl.iteye.com/upload/picture/pic/122314/56004460-9802-32d5-ab59-1054f45777af.jpg[/img]
[img]http://dl.iteye.com/upload/picture/pic/122316/fa6f01d8-2ba6-38ce-a7b5-642a09dbedcd.jpg[/img]
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class FirstProMIDlet extends MIDlet implements CommandListener {
private Command exitCommand;
private TextBox tbox;
public FirstProMIDlet(){
exitCommand=new Command("Exit",Command.EXIT,1);
tbox=new TextBox("Hello world Midlet","Hello World !",25,0);
tbox.addCommand(exitCommand);
tbox.setCommandListener(this);
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Display.getDisplay(this).setCurrent(tbox);
}
public void commandAction(Command cmd, Displayable disp) {
// TODO Auto-generated method stub
if(cmd==exitCommand){
try {
destroyApp(false);
} catch (MIDletStateChangeException e) {
e.printStackTrace();
}
notifyDestroyed();
}
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
}
[img]http://dl.iteye.com/upload/picture/pic/122318/7d3930ab-5602-3245-a651-5f35cf91d1a7.jpg[/img]
[img]http://dl.iteye.com/upload/picture/pic/122324/1bb57e63-50ff-36b2-b1d0-ade1f4a52955.jpg[/img] [img]http://dl.iteye.com/upload/picture/pic/122326/5119d78b-4359-323c-9573-53268b5e81a9.jpg[/img]