• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add multistyled text ina JTextArea?  RSS feed

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I want to add multi styled text in a JTextArea.I'm just displaying a credits screen.
i.e this screen displays a JTextArea which automatically scrolls down so that the user can view it interestingly.I want to add multi styled text in this textarea.
I also want to add an Image i.e. a logo as the intial value & append the text along with it.
Please reply as soon as possible.
Happy middling with java.
Netharam.
 
King Tan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot add image or any components to JTextArea. I think JTextArea only support PlainDocument.
If you want to do styles, you have to use StyledDocument - then use JTextPane
King
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!