JTextPane, JEditorPane, copy & paste etc.

Discussion in 'Java' started by wizofaus@hotmail.com, Feb 23, 2006.

  1. Guest

    I've been playing around with JTextPane and JEditorPane and found a few
    odd things. At least under Windows and Java 1.5, neither JTextPane or
    JEditorPane support copying & pasting of formatted text very well. The
    former doesn't support it at all (even inside the control), and the
    latter doesn't support it when interacting with other standard Windows
    controls. I can, if necessary, live without the latter, but the former
    is definitely needed.
    But while it seems quite easy to put together a simple app that lets
    you change the text display style (font, color etc.) for new and
    existing (selected) text in a JTextPane, it's not so obvious how to do
    this for a JEditorPane. Furthermore, for JTextPane, serializing via the
    XMLEncoder, as recommended by the Sun documentation, does not capture
    all the style information.

    Can anyone recommend perhaps a better third-party rich text editing
    control that would support all the functionality I'm looking for?
     
    , Feb 23, 2006
    #1
    1. Advertising

  2. Guest

    wrote:
    > I've been playing around with JTextPane and JEditorPane and found a few
    > odd things. At least under Windows and Java 1.5, neither JTextPane or
    > JEditorPane support copying & pasting of formatted text very well. The
    > former doesn't support it at all (even inside the control), and the
    > latter doesn't support it when interacting with other standard Windows
    > controls. I can, if necessary, live without the latter, but the former
    > is definitely needed.
    > But while it seems quite easy to put together a simple app that lets
    > you change the text display style (font, color etc.) for new and
    > existing (selected) text in a JTextPane, it's not so obvious how to do
    > this for a JEditorPane. Furthermore, for JTextPane, serializing via the
    > XMLEncoder, as recommended by the Sun documentation, does not capture
    > all the style information.
    >
    > Can anyone recommend perhaps a better third-party rich text editing
    > control that would support all the functionality I'm looking for?


    After playing around a bit more, I'm reasonably happy JEditorPane can
    do most of what I want. I still want a method of importing exist
    formatted text from other applications, and copy & paste would be
    ideal, but I suppose I'll have to look for alternative solutions.
     
    , Feb 23, 2006
    #2
    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. Alex
    Replies:
    2
    Views:
    1,289
  2. Replies:
    26
    Views:
    2,177
    Roland Pibinger
    Sep 1, 2006
  3. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    451
    Fredrik Lundh
    Aug 13, 2008
  4. Replies:
    1
    Views:
    333
  5. Jan Burse

    Unicode >16 Bit JTextPane etc..

    Jan Burse, Jun 8, 2013, in forum: Java
    Replies:
    16
    Views:
    463
    Stanimir Stamenkov
    Jun 9, 2013
Loading...

Share This Page