Reputation: 7894
I know that I can set the font size on a javax.swing.text.DefaultStyledDocument
like this:
public void apply(DefaultStyledDocument document) {
final MutableAttributeSet attributeSet = new SimpleAttributeSet();
StyleConstants.setFontSize(attributeSet, 12);
document.setCharacterAttributes(0, 80, attributeSet, false);
}
How do I set the font color?
Upvotes: 1
Views: 661
Reputation: 324157
I would guess you use the StyleConstants.setForeground(...) method.
Upvotes: 1