This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes changing the text font in text area	Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "changing the text font in text area	" Watch "changing the text font in text area	" New topic

changing the text font in text area

karthik muthuveeramani

Joined: Apr 12, 2001
Posts: 5
We are developing a chat program. I want to know how to have a particular text(or a particular line) bold, while the other lines remain plain.
(as in a typical chat interface).
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Karthik,
I think the only way to do that is to use the JTextPane that comes with Swing. AWT won't do at all...
Good Luck,
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
That is correct.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Nelson David

Joined: Oct 01, 2002
Posts: 13
but how? can u give example.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
This is a Swing question, so I will move the topic over there.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Have you checked out Aspose?
subject: changing the text font in text area
It's not a secret anymore!