What you are asking is, "How do I display text in different colors?" The answer depends on how you are displaying the text. If you are creating a Swing GUI, then you could use JLabel or JTextfield and set the appropriate color attributes of those controls.

What you are asking is, "How do I display text in different colors?" The answer depends on how you are displaying the text. If you are creating a Swing GUI, then you could use JLabel or JTextfield and set the appropriate color attributes of those controls.

Yep, or else use separate font object with required color you want and add it on relevant Swing control.