Hello Apologies if the question has been answered before, I've found no relevant info in archives. My basic question is how to make JSvgCanvas to show an svg content generated by SvgGraphics2D. I'm working at Windows XP, with JDK 1.4.1 Particularly, I'm using both classes the following way : I've a subclass of JSvgCanvas, and here its fragment :
class SvgView extends JSvgCanvas { SVGGraphics2D gSvg; SVGDocument docSvg; public SvgView() { // initialize SVGGraphics2D, as shown at Batik's Generator page DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); docSvg = (SVGDocument)impl.createDocument (SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", null); gSvg = new SVGGraphics2D(docSvg); } public void paintComponent(Graphics g) { // first, let application components draw themselves as usual into SVGGraphics2D activeComponent.draw(gSvg); Element root = docSvg.getDocumentElement(); // the following line doesn't compile // getRoot() can't be applied to org.w3.dom.Element // looks like getRoot(Element) method doesn't exist ?? gSvg.getRoot(root); setSVGDocument(docSvg); // finally, draw itself super.paintComponent(g); } } } } The result is that Svg graphics is not drawn, Can you please tell me what am I missing in the code ? Thanks Seregy Beryozkin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]