wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Changing colors in Command Prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changing colors in Command Prompt" Watch "Changing colors in Command Prompt" New topic
Author

Changing colors in Command Prompt

David Maddox
Greenhorn

Joined: Feb 25, 2004
Posts: 12
I am writing a stock sim for a class project and i was wondering if there was a way to change colors of the text when you run it in command prompt(i.e. when a stock goes down turn red)
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11494
    
  16

there is (at least on XP) a color command. you could probably call it to change the colors. don't know a pure java way off the top of my head.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing colors in Command Prompt