You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Neil Patel <ne...@medtronic.com> on 2002/07/02 16:00:28 UTC

integrating Batik

I have an existing application that is a JWindow/JFrame (doesn't matter which). Whenever I try to add Batik, which is a JFrame it generates:

Exception in thread "main" java.lang.IllegalArgumentException: adding a>window to a container *

because you cannot add a JFrame to a JFrame or JWindow. Now I know the work around is to use JInternalFrames, but that means rewriting my entire existing application. Is there any other way to integrate a Batik Viewer as a JPanel or other type of component?

thanks
Neil


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: integrating Batik

Posted by Vincent Hardy <vi...@sun.com>.
Neil,


Neil Patel wrote:
> 
> I have an existing application that is a JWindow/JFrame (doesn't matter which). Whenever I try to add Batik, which is a JFrame it generates:
> 
> Exception in thread "main" java.lang.IllegalArgumentException: adding a>window to a container *
> 
> because you cannot add a JFrame to a JFrame or JWindow. Now I know the work around is to use JInternalFrames, but that means rewriting my entire existing application. Is there any other way to integrate a Batik Viewer as a JPanel or other type of component?
> 

Yes, you should use the JSVGCanvas directly.

Good luck!
Vincent.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org