gpt4 book ai didi

java - 事件错误,不确定它们的含义

转载 作者:行者123 更新时间:2023-12-02 09:14:34 24 4
gpt4 key购买 nike

我目前遇到这些错误,我尝试做一些事情看看是否有帮助。我什至使用调试器来找出发生这些错误的原因,但我仍然不确定。

如果有人能够提供帮助,我们将不胜感激。

我尝试查看建议的帖子并进行了建议的修复,但这没有帮助,错误仍然相同。

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at c3537779.ByteReader.getBytes(ByteReader.java:14)
at c3537779.BytePattern.patternParse(BytePattern.java:37)
at c3537779.FileChooser.PatternOpen(FileChooser.java:95)
at c3537779.GUI$OpenPatternAction.actionPerformed(GUI.java:74)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

最佳答案

当您尝试调用某个方法的对象不存在时,会抛出 NullPointerException。所以我们在 c3537779.ByteReader.getBytes(ByteReader.java:14) 处有它,您需要在 ByteReader 类的第 14 行上调试该进程并查看它调用了什么。如果您将看到类似 myName.myMethod(); 的内容,您应该检查 myName 对象的创建过程,因为它为 null。

关于java - 事件错误,不确定它们的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59103508/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com