| Author |
is it possible to make some words of jtextarea as bold?
|
sudheer kiran
Ranch Hand
Joined: Jun 26, 2008
Posts: 237
|
|
hi all,
i have a requirement where i need to put first word of the JTextArea in bold font.
i need to use only JTextArea as this is a table column header.any suggestions please.
thanks,
|
Sudheer
SCWCD, SCJP 5
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Switch to JTextPane instead. JTextArea only knows plain text. It takes a Document as its model. JTextPane take a StyledDocument which can be used to add style information like bold etc.
There are some drawbacks however. JTextPane misses some features JTextArea does have, like word wrapping.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
sudheer kiran
Ranch Hand
Joined: Jun 26, 2008
Posts: 237
|
|
|
thanks prime thats very useful info.
|
 |
 |
|
|
subject: is it possible to make some words of jtextarea as bold?
|
|
|