package helloworld3;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

/**
 * Einfaches MIDlet, welches einen Alert und danach eine Textbox anzeigt.
 *  
 * @author Ralf Kunze (rkunze@uos.de), Institut fuer Informatik, Universitaet
 *         Osnabrueck
 * @date 29.06.2007
 */
public class HelloWorld extends MIDlet {

    Display display = null;

    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

    }

    protected void pauseApp() {

    }

    protected void startApp() throws MIDletStateChangeException {
        display = Display.getDisplay(this);
        TextBox textBox = new TextBox("Test", null, 100, TextField.ANY);
        Alert alert = new Alert("Fehler");
        alert.setString("Alert");
        display.setCurrent(alert, textBox);
    }

}
