Serialization of JTree an its Listeners
Posted on 2001-08-20
I have problem to serialize a JTree and its listeners.
The tree is serialized/deserialized well but my listeners disapears.
explorerTree = (JTree)Serializer.deserialize("dragtree7");
if (explorerTree == null)
//create the explorer tree and add the listeners
The lis_1 echos "lis_1". This works fine in the application, but If I close it, start it and deserialize my tree then the listener is gone(no text echos when I selects a node).
But if I add another listener to the tree after deserialization.
lis_2 listener echos "lis_2".
And if I now select a node in the tree I got TWICE echos "lis_2". What happens? My first listener seems to be there but action code is replaced.
If I close application and start it again by adding a new listener, I got three echos "lis_2" and so on.