TextField.ANY, TextField.EMAILADDR, TextField.NUMERIC,
TextField.DECIMAL, TextField.PHONENUMBER, TextField.URL
};
private boolean firstTime;
public TextBoxDemo() {
display = Display.getDisplay(this);
firstTime = true;
}
protected void startApp() {
if(firstTime) {
mainForm = new Form("Select a Text Box Type");
mainForm.append("Select a text box type");
// the string elements will have no images
Image[] imageArray = null;
types = new ChoiceGroup("Choose type", Choice.EXCLUSIVE,
textBoxLabels, imageArray);
mainForm.append(types);
// 进一步选择的选项
String[] optionStrings = { "As Password", "Show Ticker" };
options = new ChoiceGroup("Options", Choice.MULTIPLE,
optionStrings, null);