我有这个使用 NetBeans 6.5.1 设计的“CustomerLogin”应用程序。代码显示没有错误。但它仍然没有运行。它在屏幕底部的输出空间中显示了一些内容。这些都是什么?我该怎么办?以下是输出窗口中显示的内容:
init:
deps-jar:
compile-single:
run-single:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:167)
at CustomerLogin.initComponents(CustomerLogin.java:65)
at CustomerLogin.<init>(CustomerLogin.java:22)
at CustomerLogin$3.run(CustomerLogin.java:151)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
BUILD SUCCESSFUL (total time: 1 second)
这是显示错误的代码:
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/user-login_icon.png"))); // NOI18N