JDK-6300270 : RE 1.5.0_04 copy and paste fails in Modal JDialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0u4,6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows_2000
  • CPU: x86
  • Submitted: 2005-07-21
  • Updated: 2011-02-16
  • Resolved: 2006-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_11Fixed 6Fixed
Related Reports
Duplicate :  
Cut and Paste to a an applet with a JTextField in a Modal JDialog fails on Windows 2000 with jdk 1.5.0_04

This seems related to CR # 5086496 but there are no errors with this particular test case as there aer with that CR.  It simply doesn't cut and paste.  Thus the filing of this CR.

Attached is the test case.  It is also in  /net/cores.central/cores/64566869

Tested 1.4.2_08, 1.4.2_10, 1.5.0, and 1.5.0_04.
Note: 1.4.2_10 was tried because of another cut and paste bug with applets.
This second bug, CR # 4856343
I tried the following build:
which is available at:
All versions fail for the modal case and _08 also fails for the non-modal case.
        To reproduce:
   1) open the JavaTest.html file from /net/cores.central/cores/64566869 in IE.  
   2) Copy some text from WordPad and place it in the text box next to the "Name:"
        label.  This should work fine (except on 1.4.2_09 or earlier).  
   3) Then click the Non-Modal button.  A JDialog should open with a text
      box next to a "Name:" label.  Cut and paste should work fine here too
      (except on 1.4.2_09 or earlier).
   4) Close the JDialog
   5) Click the Modal button and a Modal JDialog should open with a text box
      next to a "Name:" label.
   6) Cut and paste to the Modal JDialog should fail.

###@###.### 2005-07-21 20:29:55 GMT

EVALUATION Copy/Paste is not possible when there is no clipboard access permission. It's also the default when no .java.policy file exists. ----- When a modal dialog is shown, the user code is in the stack. Hence SecurityManager.checkSystemClipboardAccess() reports that the system clipboard access is forbidden. We need to do event processing in modal dialog inside AccessController.doPrivileged. In this way, it wouldn't matter even if the user code is in stack.

WORK AROUND Provide java.awt.AWTPermission "accessClipboard" on .java.policy file