S
SevenOrient
Unregistered / Unconfirmed
GUEST, unregistred user!
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class bbb extends MIDlet implements CommandListener
{
private Display firstDisplay ;
private Form firstForm ;
private Commanddo
neCommand;
public bbb()
{
firstDisplay = Display.getDisplay(this) ;
do
neCommand = new Command("DONE", Command.SCREEN, 1);
firstForm = new Form("Hello,测试") ;
StringItem firstStrItem = new StringItem("哈罗","米德列特") ;
firstForm.append(firstStrItem) ;
System.out.println("MIDlet启动") ;
}
protected void startApp() throws MIDletStateChangeException
{
TextBox textBox = new TextBox("Hello Midlet", "Hello !!", 256, 0);
textBox.addCommand(doneCommand);
textBox.setCommandListener( (CommandListener) this);
firstDisplay.setCurrent(firstForm) ;
firstDisplay.setCurrent(textBox);
}
protected void pauseApp()
{
}
protected void destroyApp(boolean unconditional) throws MIDletStateChangeException
{
}
public void commandAction(Command command, Displayable screen)
{
if (command ==do
neCommand){
destroyApp(false);
notifyDestroyed();
}
}
}
import javax.microedition.midlet.*;
public class bbb extends MIDlet implements CommandListener
{
private Display firstDisplay ;
private Form firstForm ;
private Commanddo
neCommand;
public bbb()
{
firstDisplay = Display.getDisplay(this) ;
do
neCommand = new Command("DONE", Command.SCREEN, 1);
firstForm = new Form("Hello,测试") ;
StringItem firstStrItem = new StringItem("哈罗","米德列特") ;
firstForm.append(firstStrItem) ;
System.out.println("MIDlet启动") ;
}
protected void startApp() throws MIDletStateChangeException
{
TextBox textBox = new TextBox("Hello Midlet", "Hello !!", 256, 0);
textBox.addCommand(doneCommand);
textBox.setCommandListener( (CommandListener) this);
firstDisplay.setCurrent(firstForm) ;
firstDisplay.setCurrent(textBox);
}
protected void pauseApp()
{
}
protected void destroyApp(boolean unconditional) throws MIDletStateChangeException
{
}
public void commandAction(Command command, Displayable screen)
{
if (command ==do
neCommand){
destroyApp(false);
notifyDestroyed();
}
}
}