for all those who google

for a solution of Streaming imageIcons in Java. I had problems, the images where lost. google words: Java Serialization ImageIcon Bug Bugfix Problem

// serialization
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
out.writeObject(smallIcon);
}

private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
smallIcon = (ImageIcon)in.readObject();
if (smallIcon!= null)
smallIcon = new ImageIcon(smallIcon.getImage());
}