.
--- Update ---
I would like to put a delay in my code but for loop conflicts with my timer.
timer = new Timer(300, new ActionListener() { public void actionPerformed(ActionEvent e) { //textArea.setText(""); for (int i = 1; i < 60; i++) { String format = "%-10s"; String someline; someline = String.format(format, new Object[]{"Number" + " " + (i) + " : " + Growth_numbers1[i] + " " + "repeats"} ); textArea.append(someline + "\n"); } } });