
netbean6.5新建桌面应用程序出错
我用netbean6.5建立了一个项目名称为VE的桌面应用程序,里面默认有三个java文件:VEApp.java;VEaboutBox.java;VEView.java,...
我用netbean6.5建立了一个项目名称为VE的桌面应用程序,里面默认有三个java文件:VEApp.java;VEaboutBox.java;VEView.java,我什么都没做,直接编译运行VEApp.java,却总是提示如下错误:
init:
deps-jar:
compile-single:
run-single:
2009-3-10 16:11:37 org.jdesktop.application.Application$1 run
严重: Application class ve.VEApp failed to launch
java.lang.NullPointerException
at ve.VEView.<init>(VEView.java:31)
at ve.VEApp.startup(VEApp.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class ve.VEApp failed to launch
at org.jdesktop.application.Application$1.run(Application.java:177)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
at ve.VEView.<init>(VEView.java:31)
at ve.VEApp.startup(VEApp.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
... 8 more
成功生成(总时间:3 秒)
1、请问这个问题该如和解决?
2、在VE项目中,新建JFrame窗体,往JFrame窗体中添加的控件在预览时能现实,运行后就显示不了字体了,比如,我添加一个名字为“确定”的JButton,预览时能够正常显示,可运行后只能显示有这个按钮,却显示不了按钮上面的字体,请问这该如何解决?
我自己没有添加任何代码,建立的“桌面应用程序”是netbean6.5自动生成的那个状态,代码我没动过。 展开
init:
deps-jar:
compile-single:
run-single:
2009-3-10 16:11:37 org.jdesktop.application.Application$1 run
严重: Application class ve.VEApp failed to launch
java.lang.NullPointerException
at ve.VEView.<init>(VEView.java:31)
at ve.VEApp.startup(VEApp.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class ve.VEApp failed to launch
at org.jdesktop.application.Application$1.run(Application.java:177)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
at ve.VEView.<init>(VEView.java:31)
at ve.VEApp.startup(VEApp.java:19)
at org.jdesktop.application.Application$1.run(Application.java:171)
... 8 more
成功生成(总时间:3 秒)
1、请问这个问题该如和解决?
2、在VE项目中,新建JFrame窗体,往JFrame窗体中添加的控件在预览时能现实,运行后就显示不了字体了,比如,我添加一个名字为“确定”的JButton,预览时能够正常显示,可运行后只能显示有这个按钮,却显示不了按钮上面的字体,请问这该如何解决?
我自己没有添加任何代码,建立的“桌面应用程序”是netbean6.5自动生成的那个状态,代码我没动过。 展开
5个回答
展开全部
你用的JDK什么版本?最新的1.6.0update12和NetBeans是有冲突的,如果是请降级用1.6.0update11以下的
展开全部
抛的是空指针异常是不是哪里没初始化啊~~~好好检查看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看看代码
构造方法里面的
构造方法里面的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(VEView.java:31行 空指针了.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
直接重装netBeans
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询