By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,369 Members | 1,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,369 IT Pros & Developers. It's quick & easy.

<html> inside JTextarea

100+
P: 184
Hi,
can anyone please say me how to add <html> tags inside JTextarea?
Thanks in Advance.

-Thanks & Regards,
Hamsa
Apr 3 '08 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
Hi,
can anyone please say me how to add <html> tags inside JTextarea?
Thanks in Advance.

-Thanks & Regards,
Hamsa
Use an editor pane instead.
Apr 3 '08 #2

100+
P: 184
Use an editor pane instead.

Thank you.. if u dont mind can u please clear my following question..
In JTextarea,I need to change the font colour for particular word or first word in that textarea.How is that possible? if i use as textarae.setFont() means whole text in that textarea gets change rite?


-Thanks & Regards,
Hamsa
Apr 3 '08 #3

Expert 10K+
P: 11,448
Thank you.. if u dont mind can u please clear my following question..
In JTextarea,I need to change the font colour for particular word or first word in that textarea.How is that possible? if i use as textarae.setFont() means whole text in that textarea gets change rite?


-Thanks & Regards,
Hamsa
Yep right; a JTextArea is a simple widget: it uses one back/foreground colour
for everything. As was suggested already you need a component that can handle
StyledDocuments, in particular an HTML document. Read the API documentation.

kind regards,

Jos
Apr 3 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.