package Prueba;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Prueba extends MIDlet implements CommandListener
{
private Command exitCommand;
private Display display;
private Form formulario;
public Prueba()
{
display = Display.getDisplay(this);
exitCommand = new Command("Salir",Command.EXIT,2);
formulario = new Form("Formulario de prueba");
StringItem saludo= new StringItem("","Esto es una prueba");
formulario.append(saludo);
formulario.addCommand(exitCommand);
formulario.setCommandListener(this);
}
public void startApp()throws MIDletStateChangeException
{
display.setCurrent(formulario);
}
public void pauseApp()
{
}
public void destroyApp(boolean incondicional)
{
}
public void commandAction(Command c, Displayable s)
{
if(c== exitCommand)
{
destroyApp(false);
notifyDestroyed();
}
}
}