I'm wondering if it possible to print multiple colors by using System.out.println();
Printable View
I'm wondering if it possible to print multiple colors by using System.out.println();
I did a quick google because i dont know the answer, and this forum looked like it might be helpful... post number 6 in particular.
Text color in Windows console
hope this helps!
But what about the response in #9? I tried this and see the same (unfortunate) thing as the OP of that thread.
I note in passing that #4 and #10 are responses by "names" in the Java online world who I would trust.
"freaks out" :D
I tried the #6 on that forum, but no result.
Maybe it is important to know that I use Mac OS X 10.6.5 and as program I use DrJava.
My take on this is if you want multicolored output, then your best bet is to create a GUI app.
In the old days there were even 'paper consoles'; you can't change the colour of ink; a lot of consoles (terminals) are monochrome and you can't change their colours either. Colour terminals all use different commands or codes to change their colours. There is no standard way to do it. A Java GUI can display different colours in a standard way (as long as it is Java). An alternative is jcurses; it's an attempt to support all those different consoles so that you (the jcurses user) only have to deal with jcurses' way of communicating with any console.
kind regards,
Jos
You seem to want a more varied and aesthetically pleasing output for the user, and the avenue you choose to try to do this with, the Java console is not suited for this. Instead you could create a GUI or graphical user interface Java program with the Swing library. If you are unfamiliar with this, you may wish to Google this for more information.