-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta3
-
x86
-
windows_2000
Name: bsC130419 Date: 08/07/2001
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
Compile and run the following code:
import java.beans.*;
import java.io.*;
import javax.swing.*;
public class Test
{
public static void main( String[] args )
{
try
{
JPanel lPanel = new JPanel();
JLabel lLabel = new JLabel(new ImageIcon("Test.gif"));
lPanel.add(lLabel);
XMLEncoder e = new XMLEncoder(
new BufferedOutputStream(
new FileOutputStream("Test.xml")));
e.writeObject(lPanel);
e.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
An error message results:
java.lang.NullPointerException
Continuing ...
java.lang.RuntimeException: failed to evaluate: <unbound>=ImageIcon.new(null);
Continuing ...
Note: So far, this message ONLY appears when attempting to persist JLabel
objects with an icon defined.
(Review ID: 129541)
======================================================================