notSerializableException even though the class is Serializable

Hello,

I have created a class called plot2D which extends an Applet and implements Serializable. It contains many other objects and components within itself. From a different class I loded a Vector of Plot2D-s and when I try to save ot to a file, it gives me a java.io.NotSerializableExeption: musr.client.plot2d.Plot2D$3. I don't understand why.

i thought that it might be because Plot2D might contain an Object that is not Serilizable but wouldn't in that case the exception point out to that other Object rather than to Plot2D? And what does $3 mean?

If anyone has an idea why this doesn't work, would you have any suggestions to what the problem might be?

Thanks

Ivan

[720 byte] By [itucakov] at [2007-9-26 15:56:56]
# 1
perhaps you have an internal class in the file that does not implement serializable. I think the $ represents and internal class. Not reall y sure though!
jimmythesaint at 2007-7-2 19:06:40 > top of Java-index,Core,Core APIs...
# 2

Ivan,

The $3 indicates an inner class. I think it will be the third inner class in the source for Plot2D. Perhaps this inner class instantiates a new object that is not Serializable (e.g., Runnable or EventListener). You may need to create a new class that extends the non-Serializable class and implements Serializable, then instantiate from that new class.

Kevin

KevinKC at 2007-7-2 19:06:40 > top of Java-index,Core,Core APIs...