|
|
Re: How to display text in different colors in JTextField of Swings
|
Posted: Jul 12, 2005 6:35 AM
|
|
Though I have no clue what flower brackets are, here's a suggestion:
Try to define your own font with new Attributes.
take a TextAttribute for which you define a foreground.
classes that you'll probably need and should look up on the java api would be Font, Color, TextAttributes (and its Parent class).
I must say that I'm not sure if this would work 100%, but its a suggestion.
You probably do need to create your own font though.
After which you'll simply say:
textField.setFont(myNewFont);
Good luck
|
|