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,字体为宋体,字形带有下划线的字体
使用Java生成带有下划线字体的文字
猜你喜欢
转载自www.cnblogs.com/ydymz/p/9541106.html
今日推荐
周排行