io = new ObjectInputStream(bi);
svg=(ShapesContainer)io.readObject();
editor.addComponent(svg.getComponent());
for (Iterator it = svg.iterator(); it.hasNext();) {
AbstractShape abs = (AbstractShape)it.next();
abs.addListener( (ShapeListener)svg.getComponent());
}
} catch (IOException e1) {
e1.printStackTrace();
} catch (ClassNotFoundException e2) {