如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? |
1.如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? | |
该类里没有这些方法,只有一个replaceRange(String str, int start, int end),但那个end好象很难知道用什么值。我要全部替换。 |
2.Re:如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? | |
JTextArea TA1 = new JTextArea(); 1)清空: TA1.setText(""); 2)其它串如:Str1 TA1.setText(Str1); 3)不可编辑: TA1.setEditable(false); |
3.Re:如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? | |
JTextArea is the sub-class of JTextComponent so you can use all the method defined in the JTextComponent, such as setText(null), setEditable(boolean), etc. |
4.Re:如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? | |
shsen,java api doc is very helpful. Recommend you to download and take it as reference while coding. You can find all of the api you want . |
5.Re:如何把JTextArea里的内容清空或用其他字符串赋值?还有怎么设成不可编辑? ] | |
looker wrote: nod, 不过我经常用的是chm格式的api doc, 好处是直接在索引栏中输入setSize,就会调转到相应的apidoc, 效率比较高 另外一个就是JBuilder加上ProductityPro插件, 显示光标的api doc |