站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2ME 专题ChoiceGroup的问题

ChoiceGroup的问题

摘要: ChoiceGroup的问题


为什么我这样定义会出问题?》:
ChoiceGroup cg = new ChoiceGroup("select:", ChoiceGroup.IMPLICIT);
而我这样定义是OK的。。
ChoiceGroup cg = new ChoiceGroup("select:", ChoiceGroup.EXCLUSIVE);
别的类别都不会出问题。就是IMPLICIT就出问题。报错如下:
Running with storage root DefaultColorPhone
Running with locale: Chinese_People's Republic of China.936
java.lang.IllegalArgumentException
at javax.microedition.lcdui.ChoiceGroup.(+67)
at javax.microedition.lcdui.ChoiceGroup.(+10)
at javax.microedition.lcdui.ChoiceGroup.(+11)
at hsu.ClientBox.(+81)
at hsu.StupidBTMIDlet.commandAction(+82)
at javax.microedition.lcdui.List.callKeyPressed(+80)
at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+121)
at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+178)


IMPLICIT只适用于List



The IMPLICIT type is not valid for ChoiceGroup objects.

没有仔细看。呵呵。谢谢楼上的大哥




↑返回目录
前一篇: 蓝牙怎么打开
后一篇: 请兄弟帮忙:手机文本式“Hello World !”的小程序