?
=?ISO-8859-1?Q?Peter_Valdemar_M=F8rch?=
If an applet uses JTextFields, it is impossible to copy text from the
console to the clipboard (or anywhere else) if the console is opened
after the applet.
See http://demo.capmon.dk/~pvm/nocopy/nocopy.html for a working applet
with source and class file to try it out on...
So if something bad has happened, and there are hints in the console
e.g. a stack trace, it all has to be retyped by hand, since all Copy
or export is impossible...
Does anyone know of a workaround for this? I'd like to be able to e.g.
copy stack traces to bug reports.
Try these test cases:
* Close all browser windows. Open a browser and visit this page. After
the page with this applet has loaded, then open the console with
"Tools/Sun Java Console" (or "Tools/Web Development/Java Console" in
Mozilla). Select some text in the console. There is no way to put this
text on the clipboard; the "Copy" button doesn't work, and neither
does CTRL+Insert, CTRL+C or anything else.
* Close all browser windows. Open a browser window no some non-java
page and then open the console with "Tools/Sun Java Console" (or
"Tools/Web Development/Java Console" in Mozilla). Then visit this
page. Select some text in the console. Now the "Copy" button does
work, enabling "export" of e.g. stack traces to other applicaitons
e.g. email.
The difference is which is opened first: The console or the applet. If
you look at the very rudimentary Java source code, it is the mere
creation of a JTextField is what disables or breaks the Copy
functionality.
I've tried this on Windows XP with IE 6.0 and Mozilla 1.3 and they
behave exactly the same. The JVM is Sun's 1.4.2 and I've tried
1.4.1_02 also with the same behavior. I've also tried javac from both
1.4.2 and 1.4.1_01
console to the clipboard (or anywhere else) if the console is opened
after the applet.
See http://demo.capmon.dk/~pvm/nocopy/nocopy.html for a working applet
with source and class file to try it out on...
So if something bad has happened, and there are hints in the console
e.g. a stack trace, it all has to be retyped by hand, since all Copy
or export is impossible...
Does anyone know of a workaround for this? I'd like to be able to e.g.
copy stack traces to bug reports.
Try these test cases:
* Close all browser windows. Open a browser and visit this page. After
the page with this applet has loaded, then open the console with
"Tools/Sun Java Console" (or "Tools/Web Development/Java Console" in
Mozilla). Select some text in the console. There is no way to put this
text on the clipboard; the "Copy" button doesn't work, and neither
does CTRL+Insert, CTRL+C or anything else.
* Close all browser windows. Open a browser window no some non-java
page and then open the console with "Tools/Sun Java Console" (or
"Tools/Web Development/Java Console" in Mozilla). Then visit this
page. Select some text in the console. Now the "Copy" button does
work, enabling "export" of e.g. stack traces to other applicaitons
e.g. email.
The difference is which is opened first: The console or the applet. If
you look at the very rudimentary Java source code, it is the mere
creation of a JTextField is what disables or breaks the Copy
functionality.
I've tried this on Windows XP with IE 6.0 and Mozilla 1.3 and they
behave exactly the same. The JVM is Sun's 1.4.2 and I've tried
1.4.1_02 also with the same behavior. I've also tried javac from both
1.4.2 and 1.4.1_01