amazing_andr3
06-25-2005, 08:20 AM
typingArea is a textarea. This code will copy the text in appletviewer. When I run it in the browser, the text won't get copied because the applet doesn't have access to the clipboard.
Now the problem is that the catch statement doesn't work. There is no frame alerting the user!
try {
typingArea.copy();
} catch (SecurityException se) {// can't access clipboard
Frame frame = new Frame();
JOptionPane.showMessageDialog(frame, "The applet does not have access to the clipboard. You have to press CTRL + C to copy it.");
}
Now the problem is that the catch statement doesn't work. There is no frame alerting the user!
try {
typingArea.copy();
} catch (SecurityException se) {// can't access clipboard
Frame frame = new Frame();
JOptionPane.showMessageDialog(frame, "The applet does not have access to the clipboard. You have to press CTRL + C to copy it.");
}