Re: Copy/Paste Problem in JDialog
Rohit Gupta wrote:
.....
Let me explain you my complete situation.
I have to run my code both as an application as well as an applet.
Thanks. I'd missed that detail and it fills some blanks.
Initially when I was using the JDialog, I was able to copy/paste from
it in an application but not when I ran it as an applet. This was the
reason for my first post initially. I wanted to do copy paste from
applet. I think you are also saying this.
Now since it was evident I couldn't do a copy/paste from the applet if
I used JDialog,
You *can* if it is signed, and the user trusts it.
(At least I am pretty sure that is the case*)
...I used a JFrame instead of it as I posted in the last
sscce. This helped me to copy/paste from the *applet* also (apart from
application) which I was desperate for. I hope we are now thinking
along the same lines, or is there still any confusion?
.....hmmmm. I think so.
* Either I was wrong all along, or you have
discovered (what appears to be) a security bug.
I believed the Dialog should *not* be able to access the
clipboard when launched from the unsigned Applet - that
has been confirmed by the example I posted.
You explain that a Frame launched from an untrusted
applet *can* access the clipboard.
** It should not be allowed to do so. **
I will need to investigate further, please stay tuned
to this thread for some time to come. It might take
a while and the end result might (possibly) ruin
your current strategy..
Andrew T.