> I'm using an RTFEditorKit in a JTextPane. I'd like to copy the RTF
> text from the text pane to the (Windows) clipboard, but calling
[quoted text clipped - 3 lines]
>
> Is this a bug in the RTFEditorKit?
Probably, I don't know for sure. I know that the Styled document doesn't
implement a proper way to get styled text back, so this might be the
root of your problem. See
http://groups.google.com/groups?threadm=1108628560.718458.178640%40l41g2000cwc.g
ooglegroups.com
for a related discussion.
Also, check Sun's bug parade to find out if this is a known bug.
> Will it ever be fixed?
Most likely not. RTF (and HTML) editing don't have any attention from Sun.
> If it is a bug, how do I go about fixing it?
You could try to work around it by drilling down to the document, and
trying to write some own extraction method for the current selection.
You could then try to manually copy that DataFlavor to the clipboard
(see the java.awt.datatransfer package) or via a custom TransferHandler.
> I gather I need to
> implement a new TransferHandler, but I don't know how to do that or
> where to go for more information.
TransferHandler is just a front end to the java.awt.datatransfer
package. Have a look at the documentation for that package to understand
the basics. Then check
http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq