问题描述
- Exception in thread "AWT-EventQueue-0"
-
请问各位这是什么问题啊?求指教Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at zzk.zhuoyue.daohang.MainDaohangFrame.initComponents(MainDaohangFrame.java:717)
at zzk.zhuoyue.daohang.MainDaohangFrame.(MainDaohangFrame.java:51)
at zzk.zhuoyue.daohang.MainDaohangFrame$57.run(MainDaohangFrame.java:1338)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
解决方案
检查MainDaohangFrame.initComponents,里面有变量为null,贴出它的代码
是不是控件初始化出错。或者配置文件。
解决方案二:
空指针异常,应该是有值为空