Re: formatted printing of text- color



Roedy Green wrote:
On 29 Nov 2005 14:28:58 -0800, "babo" <moron68@xxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :


I don't know how to use println  with diferent color of text from
default and to print ascii  of card signes, like hearts, spike, etc...


Consoles don't support colour.  You have to create your own logging
window that supports colour.

Most consoles do support color. The problem is that different consoles support color in different ways. There are libraries that can shield applications from the differences between different console interfaces. A quick Google turns up this library, which I have not used:


	http://sourceforge.net/projects/javacurses/

Alternatively, if the output is meant only for logging, it might be easier to write some kind of rich text, e.g. HTML. If the output is to be read in real-time, and color is absolutely necessary, Swing might be the best option.
.