JTextPane and database persistence

T

Terry

I am using a JTextPane for displaying formatted text and images. Works
great, but I now need database persistence. I am using MySQL for
storage but am having difficulty getting all the format information
from JTextPane. The getText() method returns only the string
information entered (i.e. no formatting). I presumed there is some way
of getting a sequence of bytes that represent all the text and format,
but I am at a loss on how / where to obtain it. I have looked at the
DefaultStyledDocument class and its predecessors, but no luck.

Can anyone shed some light for me on how to proceed?

Thanks
Terry VanDerMaarel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top