早教吧 育儿知识 作业答案 考试题库 百科 知识分享

java画图报错!看不懂是什么意思啊、、、、Exceptioninthread"AWT-EventQueue-0"java.lang.NullPointerExceptionatgraproject.DrawLine.FullLineY(DrawLine.java:56)atgraproject.Painting.paint(Painting.java:49)atgraproject.Painting.(Paint

题目详情
java画图报错!看不懂是什么意思啊、、、、
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at graproject.DrawLine.FullLineY(DrawLine.java:56)
at graproject.Painting.paint(Painting.java:49)
at graproject.Painting.(Painting.java:41)
at graproject.BeginFrame$3.actionPerformed(BeginFrame.java:105)
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.plaf.basic.BasicButtonListener.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.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)
▼优质解答
答案和解析
空指针异常.你可以查查在调用数据或对象的时候未传递相应的数据.
at graproject.DrawLine.FullLineY(DrawLine.java:56)
at graproject.Painting.paint(Painting.java:49)
at graproject.Painting.(Painting.java:41)
在这里提示找找,这个问题还是可以解决的.