Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4255232

Swing cut and paste functions don't use PRIMARY selection

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.1
    • 1.1.6, 1.2.1
    • client-libs
    • ladybird
    • generic, sparc
    • generic, solaris_2.5.1



        Name: skT88420 Date: 07/19/99


        Most common X applications share data via the PRIMARY selection.
        However, the cut and paste methods of JTextComponent use the
        CLIPBOARD selection. There seems to be no way to access the
        PRIMARY selection from a Java application. This makes it
        difficult to exchange data with other applications. The only
        workaround is to reconfigure key and mouse binding on all other
        applications, one by one. This is not a happy solution.

        I suspect that this is the result of a deliberate design
        decision. Perhaps the designers of Swing felt that using the
        CLIPBOARD selection was the most portable solution, and that
        there is nothing comparable to the PRIMARY selection on
        non-Unix platforms. Unfortunately this is at odds with how
        common X applications work. The result is that Java
        applications look lame on a Unix platform.

        I'd like to suggest a solution that wouldn't compromise
        portability: On Unix platforms, the cut method could copy
        data to *both* the CLIPBOARD and the PRIMARY selection.
        The paste method could look first to the CLIPBOARD for data,
        and then to the PRIMARY selection if the CLIPBOARD selection
        doesn't exist. This would allow Java apps to painlessly
        exchange data with xterm, emacs, and other common tools.
        (Review ID: 85773)
        ======================================================================

              dmendenhsunw David Mendenhall (Inactive)
              skonchad Sandeep Konchady
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: