new Form(String value) : Form « javax.microedition.lcdui « Java by API






new Form(String value)

  
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;

public class Main extends MIDlet {
  protected Display display;
  protected boolean started;

  protected void startApp() {
    if (!started) {
      display = Display.getDisplay(this);

      Form form = new Form("Item Layout");

      form.append("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;
    }
  }

  protected void pauseApp() {
  }

  protected void destroyApp(boolean unconditional) {
  }
}

   
    
  








Related examples in the same category

1.Form: addCommand(Command cmd)
2.Form: append(Item item)
3.Form: setItemStateListener(ItemStateListener iListener)