代码大概是这样的。。看起来很丑。。
2 回答

呼唤远方
TA贡献1856条经验 获得超11个赞
label.setFont(f.getFont().deriveFont(Font.PLAIN, 18f));
deriveFont(float size)
Creates a new Font object by replicating the current Font object and applying a new > > size to it.
deriveFont(int style, float size)
Creates a new Font object by replicating this Font object and applying a new style and > size.
Reference: Java8 doc
添加回答
举报
0/150
提交
取消