Revision as of 21:05, 9 February 2011 by Han84 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

Questions/answers with a recent ECE grad

Ryne Rayburn