| | | | Browse by category |
Article ID: 880
Last updated: 05 Feb, 2008
Problem
A NullPointerException is thrown when an image is accessed in Netscape 4.x when using the getResource() method, JWidgets 3.0, and the JDK 1.1.
Cause
This could be a bug in Netscape 4.x and currently there is no patch for it.
Action
Do the following:
A NullPointerException is thrown when an image is accessed in Netscape 4.x when using the getResource() method, JWidgets 3.0, and the JDK 1.1.
Cause
This could be a bug in Netscape 4.x and currently there is no patch for it.
Action
Do the following:
- Place the image in a Jar File.
- Use the getResourcesAsStream() instead of the getResource()method.
Example:
byte[] contents = null;
in = new DataInputStream(getClass().getResourceAsStream(resources/forward.gif)); contents = new byte[in.available()]; in.read(contents); ImageButton myButton = new ImageButton(new SerializableImage(contents)); add(myButton);
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 880
Last updated: 05 Feb, 2008
Revision: 1
Views: 3685
Posted: 01 Dec, 1997 by
Dean J.
Updated: 05 Feb, 2008 by
Dean J.
Others in this category
Powered by KBPublisher (Knowledge base software)