关于JTextArea
想在JTextArea类的对象中实现在当前光标处粘贴内容应如何做?我用append()方法,只能粘贴在尾部
2007-05-12 16:45

2007-05-12 17:18
int |
getCaretPosition() Returns the position of the text insertion caret for the text component. |
void |
insert(String str, int pos) Inserts the specified text at the specified position. |
2007-05-12 17:19
2007-05-12 17:20
2007-05-12 17:20
谢谢各位大侠,让我试试!
2007-05-14 08:11
我懂了
要这样用 jTa.insert(text,jTa.getCaretPosition());
2007-05-14 09:08
2007-05-14 11:53