Hi Cui,
> however, removing the element is the last thing I want to do, because it > might cause concurrent exception if any related thread doesn't work in time, > and most of the time they don't... Weird, this hints towards the common "not using the update manager thread" issue [1]... > Actually I want the animation only start if I press the button, which means > it is stopped at first as the svg is loaded. You can start on element clicking using a syntax similar to begin="elementId.click". A set of nice examples is available [2], although I haven't checked if Batik even supports this syntax. > I would get a null pointer exception when I start the program: > Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Note that there were a couple of fixes in the trunk code [3] recently (revision 711768, for example, see bug 46155 for more information) which seem tightly related. Please remember to include relevant information such as Batik version (or revision when working with SVN), Java version and operating system (as a minimum). Hope this helps, Helder [1] http://xmlgraphics.apache.org/batik/faq.html#batik-error [2] http://www.xml.com/pub/a/2004/06/30/svgtype.html [3] http://xmlgraphics.apache.org/batik/download.html#Subversion+repository --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
