我正在尝试更改我的Substance applet的字体。
在Substance look and feel - dark skins处的文档中,标题栏有自定义字体。我已经阅读了文档中有关设置字体的任何内容,但没有任何结果。
这就是我的标题现在的样子:
如何更改Substance / JFrame标题栏字体?
答案 0 :(得分:0)
来自OP的编辑:
SubstanceLookAndFeel.setFontPolicy(new FontPolicy() {
public FontSet getFontSet(String arg0, UIDefaults arg1) {
FontSet fontSet = new FontSet() {
public FontUIResource getWindowTitleFont() {
return new FontUIResource(new Font("Serif", Font.PLAIN, 12)); //this is where the title font changes
}
public FontUIResource getTitleFont() {
return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
}
public FontUIResource getSmallFont() {
return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
}
public FontUIResource getMessageFont() {
return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
}
public FontUIResource getMenuFont() {
return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
}
public FontUIResource getControlFont() {
return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
}
};
return fontSet;
}
});