You can do this:
textArea.setText("The new text
" + textArea.getText());
Or, an even better solution would be this:
try {
textArea.getDocument().insertString(0, "The new text
", null);
} catch (BadLocationException e) {
e.printStackTrace();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…