Hi Caesar, "Caesar Ralf (Fenrir) Franz Hoppen" <[EMAIL PROTECTED]> wrote on 08/26/2008 11:25:27 AM:
> I got a solution, but it was kind of strange. I compiled everything > to a jar and executed it using java -Xms500 -Xmx800 myjar.jar and it > started to work as it should, rendering everything without problems. So I believe the bug is still present, but since it's a race condition between building the document and swing putting the canvas into the frame you have simply shifted the likelihood of swing winning the race. I strong suggest that you call pack on the frame once you are done building it. > 2008/8/26 <[EMAIL PROTECTED]> > > Hi Caesar, > > "Caesar Ralf (Fenrir) Franz Hoppen" <[EMAIL PROTECTED]> 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. > > > > -- > What said Odin to the Gods and to the Champions who surrounded him? > "We will give our lives and let our world be destroyed, but we will > battle so that these evil powers will not live after us." Out of > Hel's ship sprang Fenrir the Wolf. His mouth gaped; his lower jaw > hung against the earth, and his upper jaw scraped the sky. Against > the Wolf Odin All-Father fought... > > ...By Fenrir the Wolf Odin was slain.
