Answer the question
In order to leave comments, you need to log in
How to make a string of any color JAVA?
I am new to programming. dug all over Google, how to set a color for a line (I want red) and then write this line into a JTextArea. here is part of my code:
String str25 ="";
List result6001 = new ArrayList(list25);
result6001.removeAll(array25);
List result6002 = new ArrayList(array25);
result6002.removeAll(list25);
str25 += ("\n" + "\n" + no.obl25 + " " + ur.url25 + "\n" + " Assignments: " + result6001 + "\n" + " Values: " + result6002);
String string ="";
String string1 = "";
if (result6001.
else string1 = "More changes per day";
jtextarea.apped(str25);
I want to change the color of str25 in the if. I will be grateful for any tips or references to literature
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question