Color lines in JTextPane

Hi,

I'd like to set the background color of a JTextPane on specific line numbers.

For example, data displayed in my text pane looks like this

1. Some data here

2. Other data here

3. ...

Is there a way to set the background color for line 1, which fills the entire width of the text pane, and not just the background of the text in line 1?

[383 byte] By [J.D.a] at [2007-11-26 19:53:06]
# 1
You might be able to modify my line painter class. The link to download the class is in this posting: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=768960
camickra at 2007-7-9 22:44:31 > top of Java-index,Desktop,Core GUI APIs...