Hi The.Networker,

<[email protected]> wrote on 06/02/2009 12:16:57 AM:

> I build a DOM on the fly and do this:
> 
> //myDoc that has been built on the fly.
> 
> myJSVGCanvas.setDocument(myDoc);
> 
> //Add the myJSVGCanvas into a JSVGScrollPane, add the JSVGScrollPane
> into a JPanel, and display it in a JFrame.

> No matter how I resize the frame, the scroll bars will never show up. 

    Don't set the document until after the canvas has been
added to the swing tree and packed.  Without a sample app I
can't say for certain but in general setting the document
before the canvas is in the swing hierarchy is bad.

> But if I save the myDoc into a file after I build the doc and load 
> the file back to the myJSVGCanvas, scrolling works like a charm. 

   You could also have some brokeness in namespaces, etc.
Which tend to be fixed by writing to disk and reading back.
> 

Reply via email to