我没有发布任何代码,因为我甚至不知道从哪里开始。在我的JFrame上调用setVisible(true)之后,下面显示的异常发生两次,然后再也没有。就我自己的调试而言,这是我能想到的。我的程序似乎无论如何都可以正常工但是这个例外让我很烦恼,我想解决它。任何人都可以提供我的见解或调试的下一步。我可以提供所需的任何代码。
谢谢。
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.RepaintArea.paint(RepaintArea.java:249)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
at apple.awt.CWindow.handleEvent(CWindow.java:545)
at java.awt.Component.dispatchEventImpl(Component.java:4811)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)