Hi, I have a requirement to enable cut & paste from the menu in an applet. I have code that works in an applet viewer but not through the web server, although, cut & paste work on the web server when invoked with key combination (Ctl-C, Ctl-V, Ctl-X). I'm using the JTextComponent cut, copy, and paste methods in both cases, It think. I assume the security manager is looking at where the event originated to determine access to the system clipboard, i.e. the control key combination is originating from swing (trusted code) and the menu event is originating from my code (untrusted code). Is there a way to do this without modifying browser permissions? If not, I can go to a code base level permission scheme, but I'd rather not muck the browser permission if I don't have to. Thanks for any help/advice you can give.
Once again, if something works in appletviewer but not in the browser, the first thing to check is whether you are using a class/method that is not available in version 1.1(which most browsers use). JTextComponent is a Swing class, from Java 2, and is not supported in the browsers. If you look at the error message in the Java console in your browser, you should see a ClassNotFoundException that will alert you to the problem.
Joined: Jan 31, 2001
Well, I don't think so. JTextComponents are working fine in my browser with the exception of cut, copy, and paste through a menu. Cut, copy, and paste are working in my browser if I trigger the events from the keyboard. The exception I'm getting is a Permission error not a class not found error.