|
Now you are in the realm of text components.
This is *the* most complex area of Swing.
You will need to find a good Swing book (there is no way I
could do it justice, here), then try using a custom document
(which implements javax.swing.text.StyledDocument) to call
setCharacterAttributes(int,int,javax.swing.text.AttributeSet,boolean)
Classes and interfaces that may be of interest, all in
javax.swing.text:
AttributeSet
Document
StyledDocument
Style
Also note that JTextField, JTextArea and
JPassword field do not support multiple text styles. You'll have to use
JEditorPane, or JTextPane.
The O'Reilly "Java Swing" book does have an example
of how to set different colours on text in a text component. That may be helpful
to you.
|
Title: RE: set color of JLabel text
- set color of JLabel text Mario Fernandes (IT Dept. - Langley)
- Re: set color of JLabel text Dmitry Beransky
- RE: set color of JLabel text Pepelis, Aaron
- Re: set color of JLabel text Greg Munt
- RE: set color of JLabel text Pepelis, Aaron
- Greg Munt
