当前位置:编程学习 > JSP >>

我的J2ME编程练习(5)——ImageItem

/* * imageItemlet.java * * Created on 2005年4月17日, 下午8:56 */
import javax.microedition.midlet.*;import javax.microedition.lcdui.*;
/** * * @author  Administrator * @version */public class imageItemlet extends MIDlet implements CommandListener,ItemCommandListener{        private Form aForm;    private Image sohuImage;    private Image neImage;    private ImageItem sohuImageItem;    private ImageItem neImageItem;    private Display aDisplay;    private Command exitCommand;    private Command connectCommand;    private Spacer aSpacer;    private Alert anAlert;            public imageItemlet() {        aForm=new Form("ImageItemTest");        exitCommand=new Command("EXIT",Command.EXIT,1);        connectCommand=new Command("Connect",Command.ITEM,2);        aSpacer=new Spacer(10,2);        anAlert=new Alert("Connecting...","Connecting to www.163.com ...",                null,AlertType.INFO);        try{            sohuImage=Image.createImage("/sohu.png");            sohuImageItem=new ImageItem(null,sohuImage,ImageItem.LAYOUT_RIGHT,                    "This is Sohu!");                    aSpacer.setLayout(Item.LAYOUT_EXPAND);
补充:Jsp教程,Java技巧及代码 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,