Thanks for the info.
     
     At work `sparc-sun-solaris2.5.5' with CDE I can copy+paste from a 
     dtterm in to a Swing JTextArea. I have not found a way to copy from 
     GNU Emacs 20.2 into a JTextArea yet.
     
     However using xcutsel -sel CLIPBOARD and pressing the button [copy 0 
     to CLIPBOARD] to copy the selection from Emacs into the CLIPBOARD 
     buffer and then using the Ctrl-V in my Swing app did the trick.
     
     So this will work in KDE at home I presume too.
     
     Yep there must be a better way. Send all messages to JavaSoft.
     
     Thanks again Jim
     


______________________________ Reply Separator _________________________________
Subject: Re: Clipboard interaction between Swing/JDK and X11
Author:  jrwatson ([EMAIL PROTECTED]) at lon-mime
Date:    24/10/98 10:56


> [EMAIL PROTECTED] wrote:
>
> > Another another thing: Can anyone get a X11 selection, say from an XTerm or 
> > Emacs and paste it directly into a JTextArea or JTextField? I cannot do it. 
> > Is this Swing/JDK related or is it another XFree86 problem ?
     
Yes, this can be done  using a program called "xcutsel".
     
You would start it like this:
     
$ xcutsel -sel CLIPBOARD &
     
When you select some text in xterm or copy in emacs, the text is stored in 
XA_CUT_BUFFER0 (see Xatom.h)
     
xcutsel provides for transfers between the cut buffer and the CLIPBOARD
     
The CLIPBOARD seems to be default for swing (i tested JTextArea) and is the one 
returned by  AWT using Toolkit.getDefaultToolkit.getSystemClipboard. But AWT (I 
have only tested TextArea) seems to use the cutbuffer.
     
You can watch things in the CLIPBOARD with xclipboard.
     
Interestingly Netscape 4.06 supports both the cutbuffer and the CLIPBOARD.  So 
there must be a better way...
     
(i am using slackware 3.5)
     
jim watson
     
     
     

Reply via email to