J2ME Program for TextBox
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Commander extends MIDlet
{
public void startApp()
{
Displayable d = new
TextBox("TextBox", "Address", 100, TextField.ANY);
Command c = new
Command("Exit", Command.EXIT, 0);
d.addCommand(c);
d.setCommandListener(new
CommandListener()
{
public void commandAction(Command c,
Displayable s)
{
notifyDestroyed();
}
} );
Display.getDisplay(this).setCurrent(d);
}
public void pauseApp() { }
public void destroyApp(boolean
unconditional) { }}
Output:-
0 comments:
Confused? Feel free to ask
Post a Comment