Add TextBox to Display : Display « J2ME « Java Tutorial

Add TextBox to Display
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;

public class TextBoxHelloMidlet extends MIDlet {
  private Display display;

  TextBox box = new TextBox("Simple Example", "Hello World", 20, 0);

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


  public void pauseApp() {

  public void destroyApp(boolean unconditional) {

31.2.1.Add TextBox to DisplayAdd TextBox to Display
31.2.2.Get color from DisplayGet color from Display
31.2.3.Is it a color cell phoneIs it a color cell phone