List: append(String stringPart, Image imagePart) : List « javax.microedition.lcdui « Java by API






List: append(String stringPart, Image imagePart)

 

import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.List;
import javax.microedition.midlet.MIDlet;

public class PaymentMIDlet extends MIDlet {
  private Display display;

  List options = new List("Method of Payment", Choice.EXCLUSIVE);

  public void startApp() {
    display = Display.getDisplay(this);
    options.append("Visa", null);
    options.append("MasterCard", null);
    options.append("Amex", null);
    display.setCurrent(options);
  }

  public void pauseApp() {
  }

  public void destroyApp(boolean unconditional) {
  }
}

   
  








Related examples in the same category

1.List.SELECT_COMMAND
2.new List(String title, int listType, String[] stringElements, Image[] imageElements)