Results 1 to 5 of 5
  1. #1
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default Changing println font color

    Is there a command I can attach to my println that will change the display color? I know we could do this in QBasic(along with changing the background color and all that). I'm not developing a GUI for this program but I would like some sort of color to help distinguish separate parts of the output.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Do you have to use the standard console?

  3. #3
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    Depending on the console you're using, there may be a number of control codes for changing the colours. If this isn't the case then there's nothing you can do (e.g. if using Windows command prompt)
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I think that there are 3rd party consoles available in the public domain and with this capability and more, though I've never used them. Google or SourceForge may help here.

  5. #5
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    No I'm running it through Eclipse so the output is displayed inside the IDE. I'm pretty sure I can change the output color through settings but I want to be able to effect individual lines of output. I'll have a look for an eclipse plugin that does this but if not it's not a big loss, just extra formatting for visual purposes on my part.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

Similar Threads

  1. Replies: 5
    Last Post: 04-25-2009, 08:00 PM
  2. to set toolItem font color
    By vidyakkk in forum SWT / JFace
    Replies: 0
    Last Post: 01-30-2009, 03:06 PM
  3. changing font size
    By diggitydoggz in forum New To Java
    Replies: 1
    Last Post: 12-25-2008, 07:48 AM
  4. Disabled JButton font color
    By p900128 in forum Advanced Java
    Replies: 1
    Last Post: 07-24-2008, 08:16 AM
  5. Swing - Changing component default font
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-11-2008, 10:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •