我一直在爲學校做這個Java項目幾周,並在幾天前完成它。它是一個數據庫管理員軟件,用於運行Access數據庫,在這種情況下,我的學校的數據庫。在Eclipse IDE中,所有工作正常,0錯誤,0警告顯示。然後,當我導出導出時,我也沒有得到任何錯誤,但是當我打開該項目時,菜單的6個按鈕中只有2個工作。菜單有6個按鈕。 5與Access連接並顯示不同的數據,其中只有其中一個工作,另一個工作於其退出按鈕的選項卡。所以我在cmd中運行導出的程序以獲得更精確的錯誤,並且此日誌彈出。導出後Java Eclipse項目的問題
C:\Users\IVAN>java -jar prueba.jar
consulta busar registro: SELECT * FROM StudentsAbsences ORDER BY Id;
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at ModificarAlumno.getCancelar_btn(ModificarAlumno.java:199)
at ModificarAlumno.getJContentPane(ModificarAlumno.java:385)
at ModificarAlumno.initialize(ModificarAlumno.java:310)
at ModificarAlumno.<init>(ModificarAlumno.java:298)
at Menu$4.actionPerformed(Menu.java:127)
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 Sour
ce)
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$000(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$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
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$1.doIntersectionPrivilege(Unknown Sour
ce)
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)
即時通訊新的在stackoverflow和真的從來沒有使用這個問題的答案網頁,所以我不知道如果我必須發佈別的東西。我必須在星期二遞交工作項目,所以我很急。任何幫助表示讚賞,如果您需要更多關於該項目的信息,請告訴我,我會盡快發佈。非常感謝你。
發佈'ModificarAlumno.getCancelar_btn()'的代碼,並解釋加載圖像的位置。 – 2012-07-09 08:14:09