JTextArea was designed for all of its text to be displayed in a single style, so that's not what you want.
JTextPane, on the other hand, can fairly easily do what you want. Do something like this
where
you should replace the "..." bits with whatever you actually want to do.
If you haven't seen AttributeSet before, it's in the javax.swing.text package and it's where you specify text style information. So the first time through the loop you could provide an AttributeSet with an italic 12-point font with red foreground color, for example, and the second time through you could provide an AttributeSet with a plain 18-point font with blue foreground color, etc.
It's permitted to pass null for the AttributeSet, but that wouldn't get you to your goal of presenting the JTextPane's lines in different styles.