HashMap<TextAttribute, Object> hm = new HashMap<TextAttribute, Object>();
hm.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); // 定义是否有下划线
hm.put(TextAttribute.SIZE, 12); // 定义字号
hm.put(TextAttribute.FAMILY, "Simsun"); // 定义字体名
Font font = new Font(hm); // 生成字号为12,字体为宋体,字形带有下划线的字体

 

相关文章:

  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-10-31
  • 2021-08-02
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2022-01-02
  • 2021-12-06
  • 2021-10-29
  • 2021-12-12
  • 2022-01-12
相关资源
相似解决方案