import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import java.io.*; public class midlet extends MIDlet { private Display display; private Form form; private int num; private Command next; public void startApp() { display=Display.setCurrent(this); num=1; form=new Form("count"); TextBox t=TextBox("count",num,256,0); form.append(t); next=new Command("+",Command.OK,1); form.t.addCommand(next); form.t.setCommandListener(this); public void commandAction(Command c,Displayable d) { if (c==next){ num++; form.t.append(num); } } } public void pauseApp() { } public void destroyApp(boolean unconditional) { } }