Here's a Java snippet that prints color output to the console (in a VT100 emulating terminal, i.e., in linux only):
public class ColorTest { public static void main (String args[]) { for (int i = 30; i < 38; i++) { System.out.println("\033[" + i + "mHello " + "\033[1;" + i + "mWorld!\033[m"); } } }
Who needs Swing, when you can make old-school ASCII interfaces, right? No fancy libraries required either.

No comments:
Post a Comment