Here you can find the source of printInTextArea(JTextArea log, String[] toPrint)
public static void printInTextArea(JTextArea log, String[] toPrint)
//package com.java2s; //License from project: Open Source License import java.util.List; import javax.swing.JTextArea; public class Main { private static String NEWLINE = "\n"; public static void printInTextArea(JTextArea log, String toPrint) { log.append(toPrint + NEWLINE);// ww w . j a v a 2 s. c om } public static void printInTextArea(JTextArea log, String[] toPrint) { for (int i = 0; i < toPrint.length; i++) log.append(toPrint[i] + NEWLINE); } public static void printInTextArea(JTextArea log, List<String> toPrint) { String[] toPrintArray = new String[toPrint.size()]; toPrint.toArray(toPrintArray); printInTextArea(log, toPrintArray); } }