public void myChange(String change) {
String tmp = jTextArea1.getText();
tmp = tmp.concat(change + "\n\r");
jTextArea1.setText(tmp);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getMaximum());
}
});
}
沒有留言:
張貼留言