public class InfoTextArea extends JTextArea implements Runnable { private String text; public InfoTextArea(String str) { text=str; } public void run() { int textLength = text.toCharArray().length(); int i=0; while(i<textLength){ setText(getText() + text.charAt(i)); i++; try { Thread.sleep(500); } catch (InterruptedException e) {} } } }
InfoTextArea area=new InfoTextArea("blabla");Thread th=new Thread(area);th.start();