new StringItem(String label, String text) : StringItem « javax.microedition.lcdui « Java by API






new StringItem(String label, String text)

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

public class Main extends MIDlet {
  protected Display display;

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

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

    form.append("line");

    form.append(new StringItem("State ", "OK"));

    display.setCurrent(form);
  }

  protected void pauseApp() {
  }

  protected void destroyApp(boolean unconditional) {
  }
}

   
    
    
  








Related examples in the same category

1.StringItem: getText()
2.StringItem: setLabel(String label)