jtextArea里怎么设置文本颜色
rt。。
[解决办法]
JTextArea_RULE.setBackground(Color.PINK); 設置背景
JTextArea_RULE.setForeground(Color.BLUE); 設置字體
[解决办法]
用html 的<font color= >標簽把你想要換顏色的字括起來就可以了
[解决办法]
String text = jTextArea2.getText(); jTextArea1.append(text);//这行兰色 jTextArea1.append("\n"); jTextArea1.setForeground(Color.blue); jTextArea1.append("<html><font color =red>test</font></html> jTextArea1.append("\n"); jTextArea2.setText("");
[解决办法]
沒看到你那個藍色的 你自己照著改下就好了
[解决办法]
回8楼,html的东西,用<html></html>括死就行了。
[解决办法]
就是这样
jTextArea1.append(" <html><font cotlor= red >test </font></html> ");
[解决办法]