JTextPane and database persistence

Discussion in 'Java' started by Terry, May 4, 2004.

  1. Terry

    Terry Guest

    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
    Terry, May 4, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Grove
    Replies:
    0
    Views:
    426
    Andy Grove
    Nov 4, 2003
  2. javaguy44
    Replies:
    17
    Views:
    3,213
    Chris Smith
    May 18, 2004
  3. javaguy44
    Replies:
    10
    Views:
    963
    Michael Berg
    May 18, 2004
  4. oopsatwork
    Replies:
    0
    Views:
    534
    oopsatwork
    Sep 28, 2005
  5. Kenneth P. Turvey

    Java Persistence API and persistence.xml

    Kenneth P. Turvey, Mar 15, 2008, in forum: Java
    Replies:
    2
    Views:
    17,258
    Kenneth P. Turvey
    Mar 16, 2008
Loading...

Share This Page