How do you change text color in Java without JFrame or HTML? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you change text color in Java without JFrame or HTML?

I am looking for a simple way to change the color of Strings in Java. I've tried using the ANSI color codes for Java, but I was unsuccessful. Could someone put an example of code that prints out red text or something. I need to see it to understand. Thank you.

5th Sep 2018, 12:39 PM
Fleet
Fleet - avatar
3 Answers
0
Where you want it to be printed? UI or console?
5th Sep 2018, 2:16 PM
Jonas Schröter
Jonas Schröter - avatar
0
Console.
18th Sep 2018, 11:08 AM
Fleet
Fleet - avatar
0
The console isn't able to print colored Text
19th Sep 2018, 11:13 PM
Jonas Schröter
Jonas Schröter - avatar