Jump to content
Excelsior Forums
mikevalentino

NullPointerException on Swing GUI

Recommended Posts

Hi,

  I have a problem now on my company Swing GUI application. It runs fine on all Windows platform except for Windows 95. The problem as below:

  I have a Swing-based GUI. It has all the necessary components( JButton, JTable, JTextField and so on) and each component has associated ActionListener. Each button I have inserted an icon (GIF) in it. However, when I click on one particular button, it will show the following error message:

  "Error Fetching Image:

     NullPointerException......... on (Unkwon Source)"

  Well, This Error is kind of random on different machine with Windows 95 installed ONLY. Other windows platform is running fine. This message only comes out after the button has successfully listen to the event and executed the desired method in the actionPerformed(). If there is error gaining the image for the button, how come I still see my icon on the JButton?

  I will really appreciate you guy encountered this problem before can provide me with some insight or just brief explanation on what might cause this to happen. If there is solution is even better Thank you.  :)

Regards

Michael

Share this post


Link to post
Share on other sites

Hi,

It seems that compiled executable is unable to locate resources. Try to use Excelsior JET GUI. It will help you to create correct project files for your application.

I had similar problems and this solution helped me. Good Luck :)

Share this post


Link to post
Share on other sites

Hi,

I have encountered exactly the same error. Our problem also

occurs only on window 95 machines. On 98, Me and XP, we

did not encounter this problem. The latter points strongly to

the likelihood that we are NOT really missing any resources

since we are testing with the same exe. It had to be due to

something external to the exe being different in Win 95 compared to the other versions of Windows.

Perhaps Jet compiled exes do not like Windows 95?

Share this post


Link to post
Share on other sites

×