I am scanning the files with different extension and putting them in String ArrayList in Java(the names with extension). I want to print with different colors into JTextArea by looking the extesions for example .xls extension as green color , .txt extension as blue color. Here is my code below ;
public void setScanResult(ArrayList<String> x)
{
textArea.append("|");
for (int i = 0; i < x.size(); i++) {
textArea.append("\n");
textArea.append((String) x.get(i));
}
x.clear();
}