FileDocCategorySizeDatePackage
FormExampleMIDlet.javaAPI DocExample1258Wed Oct 10 21:40:42 BST 2001ora.ch4

FormExampleMIDlet

public class FormExampleMIDlet extends javax.microedition.midlet.MIDlet

Fields Summary
protected javax.microedition.lcdui.Display
display
protected boolean
started
Constructors Summary
Methods Summary
protected voiddestroyApp(boolean unconditional)

    
protected voidpauseApp()

    
protected voidstartApp()

        if (!started) {
            display = Display.getDisplay(this);
            
            Form form = new Form("Item Layout");
            
            form.append("Hello");
            form.append("World");
            
            form.append("\nLet's start\na new line\n");
            form.append("This is quite a long string that may not fit on one line");
            
            form.append(new TextField("Name", "J. Doe", 32, TextField.ANY));
            form.append("Address");
            form.append(new TextField(null, null, 32, TextField.ANY));            
            
            display.setCurrent(form);
            
            started = true;
        }