Hi Caesar,

"Caesar Ralf (Fenrir) Franz Hoppen" <darkfenrirsoul@gmail.com> wrote on 08/22/2008 08:37:39 AM:

> I have an application that dynammicaly loads SVGs to canvas, put
> them in JSVGScrollpane and then in a JTabbedPane. The problem is
> that it simply doesnt renders in some computers, what's really
> strange. Already checked the application, java and batik version an
> they are all the same in all computers. The documents are there, but
> they are simply not being rendered, while in my computer and my
> tutors computer, for example, it renders.

> JSVGCanvas canvas = data.getCanvas();  
> JSVGScrollPane svgView = new JSVGScrollPane(canvas);
>  //adds to the tabbed pane
> tabbedPane.add(data.getName(),svgView);
>
> The creation of the JSVGCanvas code, this code is inside a thread
> that creates the element, but they are added to the JSVGScrollPane
> in the EDT Thread :

> JSVGCanvas canvas = new JSVGCanvas();
>           canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
>           canvas.setURI(data.getSvgURI());    
>            
>           canvas.setEnableImageZoomInteractor(false);
>           canvas.setEnableZoomInteractor(false);

  If you load the document before the canvas is in a window

it will size it's self to 1x1.  IIRC you can get it to resize
it's self by calling pack on the Frame that you put things
into.  You could also try not loading the document until you
have added the canvas to the frame that it will be in.