Hi all,
this is my question:
I have tried a simple applet with a JSVGCanvas.
With the appletviewer I haven't had any problems, but with
the browser (Mozilla + plugin jre 131 on windows2k) I got this exception:
java.lang.ExceptionInInitializerError:
java.security.AccessControlException:
access denied (java.util.PropertyPermission
org.apache.batik.min_repaint_time read)
Any Ideas? (I can't sign the applet :-( )
Thank you,
Marco.
[EMAIL PROTECTED]
PS My source code is:
//===================================================
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.util.*;
import java.net.*;
import java.io.*;
import org.apache.batik.swing.*;
import org.w3c.dom.svg.*;
import org.w3c.dom.*;
import org.apache.batik.dom.svg.*;
public class Applet1 extends JApplet
{
public void init()
{
JSVGCanvas svgCanvas = new JSVGCanvas();
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
SVGDocument doc = (SVGDocument)impl.createDocument(svgNS, "svg", null);
Element svgRoot = doc.getDocumentElement();
svgRoot.setAttributeNS(null, "width", "600");
svgRoot.setAttributeNS(null, "height", "400");
Random R=new Random();
for(int n=0;n<30;n++)
{
Element rectangle = doc.createElementNS(svgNS, "rect");
rectangle.setAttributeNS(null, "x", ""+R.nextInt(580));
rectangle.setAttributeNS(null, "y", ""+R.nextInt(380));
rectangle.setAttributeNS(null, "width", "50");
rectangle.setAttributeNS(null, "height", "25");
int colore=R.nextInt(4);
if(colore==1) rectangle.setAttributeNS(null, "style", "fill:red");
else if(colore==2) rectangle.setAttributeNS(null, "style", "fill:green");
else if(colore==3) rectangle.setAttributeNS(null, "style",
"fill:yellow");
svgRoot.appendChild(rectangle);
}
svgCanvas.setSVGDocument(doc);
getContentPane().add(svgCanvas);
}
}
//================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]