How can I display Text strings of different style on different lines of an TextArea.

John Zukowski

The AWT TextArea only supports displaying its text in a single color and single font. To display text in different styles, you can use the Swing JTextPane or JEditorPane (or create your own component).