Hi Deniz,
Thanks for replying.
I think the main defference between JTextPane and JTextArea is that
JTextArea's content type is plain only, while JTextPane can be plain or
in HTML format (Please correct me if I'm wrong, I'm new to Java). So I
think to put an action to the contents, JTextPane is more suitable than
JTextArea. But I have no idea how to do like in my first question.
Please help.
Thank You.
MM
> Hello.
> May I ask if it's specifically a JTextPane that you want to use? Do you
> know what the main difference between a JTextPane and a JTextArea is?
>
> /Deniz Dogan
Deniz Dogan - 26 Sep 2006 07:24 GMT
> Hi Deniz,
>
[quoted text clipped - 5 lines]
> think to put an action to the contents, JTextPane is more suitable than
> JTextArea. But I have no idea how to do like in my first question.
I have never worked with JEditorPane, nor its subclass JTextPane before,
but I reckon you could add a CaretListener to it and work with that.
Perhaps there's some better way to do it, that I don't know of.
Also check out this web page:
http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
Hope I could help.
/Deniz Dogan