public static void guiJTextAreaAddString(final javax.swing.JTextArea area, final String msg) {
	new Thread(new Runnable() {
		public void run() {
			String txt = area.getText();
			txt += '\n' + msg;
			area.setText(txt);
			area.setCaretPosition(txt.length());
		}
	}).start();
}


Back to JavaHowTo

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood