Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to make bold text inside java.lang.string

Status
Not open for further replies.

jasonwyz98

Programmer
Nov 24, 2003
11
US
hello

I wish to make some text bold, inside a string, does anyone know how this can be accomplished?

ex. String str = "I need help"; how to make "I" bold?

thanks
 
I don't think that it is possible using java.lang.String

However if you're using JToolTip you can use html strings to print things out like a web page.
 
A string is just an array of a characters, which is a block of bits that resides in memory - there is no concept of "bold".

Perhaps you should rephrase your question to describe how you wish to display this string in bold ?

--------------------------------------------------
Free Database Connection Pooling Software
 
thanks for the replies,

other than the tool tip method is there anyway to display some text in a JTextArea bold while other plain? Can i use html in JTextArea some other text componenet?

thanks
 
found the answer, JTextEditor Jtxtpane

thanks guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top