Hi. I have an application with a JTable and a custom cell editor
object. I have cut and paste from the system clipboard working, but
only for unformatted strings.
My custom cell editor allows text formatting including bold, underline,
italic, and selection of fonts. I would like to be able to cut and
paste to/from different cells in the program, and to/from external
software such as editors.
As far as I can see, I can easily cut and paste formatted information
between cells in my program using a custom data flavour. However, this
wouldn't allow me to cut and paste formatted text to/from word
processors etc.
Thanks in anticipation,
Ross-c
John McGrath - 29 Apr 2005 02:26 GMT
> Hi. I have an application with a JTable and a custom cell editor
> object. I have cut and paste from the system clipboard working, but
[quoted text clipped - 4 lines]
> paste to/from different cells in the program, and to/from external
> software such as editors.
In order to exchange formatted text with other programs, you will need to
decide what data formats you want to support. Many programs that support
formatted text will support HTML, so you might choose that. The Java
DataTransfer mechanism should be able to convert the clipboard contents to
a String for you, or provide a Reader that you can use to get the contents.

Signature
Regards,
John McGrath