简单的J2ME游戏--小蜜蜂
这个小游戏是大家用来学习J2ME游戏编程的入门教程,写的层次比较清晰还不错。大家可以下载下来看看。
?
下载到 http://www.3geye.net/?3/viewspace-3427
1 楼 superwb 2008-04-21
startApp threw an Exception
java.lang.NullPointerException
java.lang.NullPointerException
at VaderCanvas.sizeChanged(+44)
at javax.microedition.lcdui.Display.setCurrentImpl(+23)
at javax.microedition.lcdui.Display.setCurrent(+35)
at DemoVaders.startApp(+15)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
java.lang.NullPointerException
java.lang.NullPointerException
at VaderCanvas.sizeChanged(+44)
at javax.microedition.lcdui.Display.setCurrentImpl(+23)
at javax.microedition.lcdui.Display.setCurrent(+35)
at DemoVaders.startApp(+15)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
2 楼 superwb 2008-04-21
调试了下,发现 graphics为null
3 楼 wuhua 2008-04-21
是否是缺少图片资源呢。我这边都不会。
4 楼 superwb 2008-04-23
没有找到graphics的初始化和赋值语句。
另外我的wtk是2.5.2
另外我的wtk是2.5.2