我知道我可以像这样设置javax.swing.text.DefaultStyledDocument的字体大小:
public void apply(DefaultStyledDocument document) {
final MutableAttributeSet attributeSet = new SimpleAttributeSet();
StyleConstants.setFontSize(attributeSet, 12);
document.setCharacterAttributes(0, 80, attributeSet, false);
}如何设置字体颜色?
发布于 2009-09-02 18:01:08
我猜你用的是StyleConstants.setForeground(...)方法。
https://stackoverflow.com/questions/1369199
复制相似问题