Preferably in the terminal. But a few examples of other methods would be of use to me also.
Thanks
For Java's own Swing components it's easy: most if not all of them allow their
foreground (and background) colours to be set. Things are not so easy with
terminals because terminals are beyond the control of Java, i.e. Java can just
pump bytes to those devices and that's it. Some of these byte values can
specify another fore/background colour but every terminal uses a different
'command set' (sequence of bytes) for that. There's the ever popular VT100
set of terminals and there's the ANSI set of terminals. Both sets cover most
of the possible variations of terminals (but don't be surprised if ohers pop up
now and then!).
To cover that mess (more or less) there's 'ncurses' or 'curses'. There are Java
implementations for them. Google shows you the way: 'curses' is the key here.
kind regards,
Jos