import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.List;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class ListImage extends MIDlet {
private List list;
private Display dis;
public ListImage() {
// TODO Auto-generated constructor stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
list=new List("列表",List.MULTIPLE);
Image img=null;
try
{
img=Image.createImage("/mlogo.PNG");
}
catch(Exception e)
{
System.out.println("Error");
}
list.append("图片", img);
Font f=null;
f=Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_UNDERLINED, Font.SIZE_LARGE);
list.setFont(0, f);
dis=Display.getDisplay(this);
dis.setCurrent(list);
// TODO Auto-generated method stub
}
}
张生工作室