Results 1 to 2 of 2
Thread: Changing the color of text
- 11-04-2007, 12:30 AM #1Member
- Join Date
- Nov 2007
- Rep Power
Changing the color of text
I was just wondering how to change the color of text. I searched the Java API Documentation and the closest thing I could find was java.awt.
However, I could not implement it without getting several errors.
Could anyone supply me with a simple example? Preferably one that uses System.out.println();
Thanks in advance,
- 11-04-2007, 09:51 AM #2
As far as i know, you can not do that in a platform independent way with a console application.
But for a Swing application you can easily do that by drawing text on top of a JPanel. Check Java2D for details:
Trail: 2D Graphics (The Java™ Tutorials)
- By Daniel in forum AWT / SwingReplies: 2Last Post: 09-18-2008, 07:54 AM
- By tim in forum Suggestions & FeedbackReplies: 11Last Post: 06-29-2008, 09:35 AM
- By CyberFrog in forum New To JavaReplies: 4Last Post: 04-01-2008, 12:41 AM
- By mtoledo in forum EclipseReplies: 0Last Post: 03-25-2008, 02:35 PM
- By tim in forum Java 2DReplies: 8Last Post: 02-11-2008, 11:57 PM