Java examples for Swing:JTextComponent
update Swing Text Area in Thread
//package com.java2s; import javax.swing.JTextArea; import javax.swing.SwingUtilities; public class Main { public static void updateTextArea(final JTextArea textArea, final String text) { SwingUtilities.invokeLater(new Runnable() { public void run() { textArea.append(text);/* w w w . ja v a2 s . co m*/ } }); } }