代码和视频的一样,运行时就空指针异常,到底有没有视频的课件源码可以下载的?都没有参考
发表在Java视频课程答疑 2018-12-08
是否精华
版块置顶:

运行就一大堆错误,想下载完整的课件代码参考都没有!

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at ch1121.TableModelTest$1.actionPerformed(TableModelTest.java:70)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)

at java.awt.Component.processMouseEvent(Component.java:6505)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)

at java.awt.Component.processEvent(Component.java:6270)

at java.awt.Container.processEvent(Container.java:2229)

at java.awt.Component.dispatchEventImpl(Component.java:4861)

at java.awt.Container.dispatchEventImpl(Container.java:2287)

at java.awt.Component.dispatchEvent(Component.java:4687)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)

at java.awt.Container.dispatchEventImpl(Container.java:2273)

at java.awt.Window.dispatchEventImpl(Window.java:2719)

at java.awt.Component.dispatchEvent(Component.java:4687)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)

at java.awt.EventQueue.access$200(EventQueue.java:103)

at java.awt.EventQueue$3.run(EventQueue.java:694)

at java.awt.EventQueue$3.run(EventQueue.java:692)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)

at java.awt.EventQueue$4.run(EventQueue.java:708)

at java.awt.EventQueue$4.run(EventQueue.java:706)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)

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)


2018-12-08 16:41:29编辑
分享到:
精彩评论 3
MM_1542709945
学分:3 LV1
2018-12-09
沙发

可能是你的图片路径有问题,我之前也遇到过,后来在代码中将相应的图片名字和格式修改一致就可以了。

qianye
学分:731 LV7
2018-12-09
板凳

MM_1542709945 发表于2018-12-09 12:29

可能是你的图片路径有问题,我之前也遇到过,后来在代码中将相应的图片名字和格式修改一致就可以了。

我的没有图片的。不是图片的问题

根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2018-12-10
地板
  1. 如果运行结果与视频不一样,就说明你的代码与视频不一样。

  2. 从你给出的异常日志看,问题出现这里:

at ch1121.TableModelTest$1.actionPerformed(TableModelTest.java:70)

检查这个方法的参数为什么是null。

首页上一页 1 下一页尾页 3 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照