Here is a very simple code
public class test
{
public static void main(String[] args)
{
System.out.println(" Hello ");
}
}
I am using a BlueJ IDE.
What I want to do is make the color of the printed output red.
And change the font to any custom made font - say Arial Unicode MS.
Feel free to make changes to the code above or give detailed instructions if other things are required.
Thanks in advance.
Edit:
BlueJ seems to use a wordpad as a console. That is it Channels the output into wordpad/notepad. Does this mean I have to something else?
Or is it the bluej.defs file where I should try changing?
解决方案
You can change it to
System.err.println(" Hello ")
it will print in red color but "err" is usually used to print an error message as you may have already guessed.
I don't think you can change console font colors and attributes from within the java code. However you can try fiddling around the setting in the BlueJ app and see if you can change it that way. In other words, it depends on the host thats displaying the output.