When I try to use Group Layout Manager in my applet it gives me this odd exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)
When I don’t use a layout manager (null) it works fine. To see the whole trace dump go to nuevawave.org/sandbox/JavaGallery/GUIApplet.html and right click somewhere in the top left. If I use absolute layout, there is nothing to click on. The jar is at nuevawave.org/sandbox/JavaGallery/GUIApplet.jar. Any help is appreciated. Thanks.
I don’t know if this will help, but here is the applet code:
<applet Archive ="TestApplet.jar,swing-layout-1.0.4.jar"
Code="test.GUIApplet"
WIDTH="500" HEIGHT="300"
</applet>
You receive this Exception because the
GroupLayoutuses Reflection (thus the “RuntimePermission accessDeclaredMembers”). Reflection is considered too powerful for unsigned applets, so the only chance you have is to either sign your applet or use a different layout manager.