Image icon = Image.createImage("/midp/uidemo/Icon.png");
//注意!这里的路径是相对路径,请大家千万注意这里的细节问题
imageArray = new Image[] {
icon,
icon,
icon
};
} catch (java.io.IOException err) {
// ignore the image loading failure the application can recover.
}
String[] stringArray = {
"Exclusive",
"Implicit",
"Multiple"
};
mainList = new List("Choose type", Choice.IMPLICIT, stringArray,
imageArray);
mainList.addCommand(CMD_EXIT);
mainList.setCommandListener(this);
display.setCurrent(mainList);
firstTime = false;
}
}