Hi
While trying to read the size
of the SVGCanvas with getSVGDocumentSize().getWidth() there's a null pointer exception. I trying to put the canvas into a window.
The code:
File
f = new File("t1.svg");
svgCanvas2.setURI(f.toURL().toString());
win = new JWindow();
final JPanel pop = new JPanel();
win.setLocation(800,100);
System.out.println(svgCanvas2.getSVGDocumentSize().getWidth());
pop.add(svgCanvas);
win.getContentPane().add(pop);
win.setVisible(true);
The code is taken from the
Batik SVGCanvas Tutorial and modified with JWindow instead of JFrame. What's
wrong while retrieving the svg size
? Are there
Other possibilities
to get the size. If I use
the example code with JWindow I also get a frame
around the window. How do I get rid of it.
Thanks
Markus