Hi Paddy,

paddy <patrick_arnould@hotmail.co.uk> wrote on 01/20/2009 03:41:05 PM:

> Incidentally my DrawNode object just draws a rectangle on the SVG with a
> label, and pnlSVGMain is directly on the applet.

   I suspect the problem is in your DrawNode code.  In particular I
suspect that you are using 'createElement' instead of 'createElementNS'
with the SVG_NAMESPACE_URI for the namespace.  It would produce
exactly this sort of problem.

>             objSVGCanvas.setSVGDocument((SVGDocument)m_objSVGDoc);
>             objSVGCanvas.repaint();

    The above repaint is not useful and could be harmful.  I suggest
you remove it.  The Canvas will repaint as needed.

>             SVGGraphics2D svgGen = new SVGGraphics2D(m_objSVGDoc);
>             try
>             {
>                OutputStream os = new FileOutputStream("c:/systemdoc.svg");
>                Writer w = new OutputStreamWriter(os, "iso-8859-1");
>                svgGen.stream(m_objSVGRoot,w);

    You might find batik.dom.util.DOMUtilities.writeDocument a little
bit more direct for serializing a DOM.