JColorChooser causes java.security.AccessControl but not in 1.5
Hello,
I am using JSE1.5 on a Red Hat 9.0 system.
If i use a JColorChooser component in an applet, I get the following compile time error.
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
I tried to resolve (temporarly) the problem, using the policytool.
I created a .java.policy file in my home dir with
permission java.security.AllPermission
...but it's not working.
Any suggestions on how to debug ?
[524 byte] By [
javaGFa] at [2007-10-1 11:51:31]

Truns out this is a netbeans4.0 bug.
See listing from www.netbeans.org issue 51622 below.
Problem is connected to applet's security policy - we probably don't
set the right one. Thread creating works fine even in browser.
Workaround is add a main class which runs the applet (code used from
java samples - SwingShapeMover):
public static void main(String s[]) {
JFrame f = new JFrame("YourAppletName");
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
});
JApplet applet = new YourAppletClass();
f.getContentPane().add("Center", applet);
applet.init();
f.pack();
f.setSize(new Dimension(550,250));
f.show();
}
All created threads work fine then.