textarea可设置字体大小吗

如题所述

方法一JTextArea.setFont(new java.awt.Font("Dialog", 1, 15)); //“dialog”代表字体,1代表样式(1是粗体,0是平常的)15是字号//设置字体JTextArea.setForeground(Color.red);方法二JTextArea jTextArea1 = new JTextArea();Font x = new Font("Serif",0,20);jTextArea1.setFont(x);你试试了
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-09-20
<table id='newTable' border="5" cellpadding='0' cellspacing='1' style='background-color:yellow;'>
<tr>
<td colspan="2" style="width:100px; height:54px; clear:both; background-color:White">
<textarea style="width:100%; height:100%; border-style:none; border-width:2px; overflow-y:visible; font-size:12px; line-height:18px;">多行文本内容&多行文本内容&多行文本内容&多行文本内容</textarea>
</td>
</tr>
<tr>
<td>占位符占位符占位符</td>
<td>占位符占位符占位符</td>
</tr>
</table>
相似回答