标签:back round div shm style obj nbsp paint bsp
1 //文本颜色 2 Paint paint = new Color(44, 67, 85); 3 //文字样式 4 Font f = new Font("仿宋", Font.PLAIN, 18); 5 6 //将上面样式放入Map内 7 HashMap<TextAttribute, Object> textAttributes = new HashMap<TextAttribute, Object>(); 8 textAttributes.put(TextAttribute.FONT, f); 9 textAttributes.put(TextAttribute.BACKGROUND, paint); 10 11 //新建拥有上面样式的文字 12 textArea.setFont(new Font(textAttributes));
标签:back round div shm style obj nbsp paint bsp
原文地址:https://www.cnblogs.com/gulu-miao/p/12907718.html