如何将多个文本添加到文本区域?
我有两种方法:
public void error() {
area.setText("error"+"\n");
}
和
public void processCall(StringBuilder sb) {
area.setText("Process said:"+sb+"\n");
}
当我运行这些方法时,我在文本字段中得到的只是
Process said:(with the cursor on the next line)
错误消息被覆盖。如何编写尽可能多的文本?