日期:2014-05-20 浏览次数:20737 次
/** * prj5_1.java * 锟斤拷示锟斤拷锟斤拷诒?锟斤拷使锟斤拷ChoiceGroup * @ 锟斤拷锟斤拷 * @ version 1.0 * create on 2008-10-27 */ package src; import javax.microedition.lcdui.*; import javax.microedition.lcdui.Display; //import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; //import javax.microedition.lcdui.Item; import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDletStateChangeException; public class prj5_1 extends MIDlet { private Form mainForm=new Form("锟斤拷锟角匡拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟斤拷锟紺hoiceGroup锟斤拷Form"); private Display dis; private ChoiceGroup cg1=new ChoiceGroup("选锟斤拷锟皆别(碉拷选 锟斤拷",ChoiceGroup.EXCLUSIVE);//Choice.MULTIPLE;Fields inherited from interface javax.microedition.lcdui.Choice private ChoiceGroup cg2=new ChoiceGroup("选锟斤拷锟皆别(菜碉拷 锟斤拷",ChoiceGroup.POPUP); private ChoiceGroup cg3=new ChoiceGroup("选锟今爱好o拷锟斤拷选 锟斤拷",ChoiceGroup.MULTIPLE); // public prj5_1() { // // TODO 锟皆讹拷锟斤拷晒锟斤拷旌拷锟斤拷锟? // } protected void startApp() throws MIDletStateChangeException { dis=Display.getDisplay(this);//应锟斤拷锟皆撅拷态锟斤拷式锟斤拷锟斤拷锟斤拷锟斤拷 Display 锟叫的撅拷态锟斤拷锟斤拷 getDisplay锟斤拷MIDlet锟斤拷 dis.setCurrent(mainForm); mainForm.append(cg1); cg1.append("锟斤拷", null); cg1.append("女", null); mainForm.append(cg2); cg2.append("锟斤拷", null); cg2.append("女", null); mainForm.append(cg3); cg3.append("锟斤拷锟斤拷", null); cg3.append("锟杰诧拷", null); cg3.append("锟斤拷锟斤拷", null); dis.setCurrentItem(cg3);//锟斤拷为默锟斤拷选锟斤拷锟节达拷之前一锟斤拷要锟接碉拷FORM锟斤拷 // TODO 锟皆讹拷锟斤拷煞锟斤拷锟斤拷锟斤拷 } protected void destroyApp(boolean arg0) throws MIDletStateChangeException { // TODO 锟皆讹拷锟斤拷煞锟斤拷锟斤拷锟斤拷 } protected void pauseApp() { // TODO 锟皆讹拷锟斤拷煞锟斤拷锟斤拷锟斤拷 } }