Adding something to beginning of JTextArea

Hey guys, i have a questions...

1: Is there a way to add something to the beginning of each line in a JTextArea? I am making a notepad like application, and i would like to add something like in notepad++, where it displays what line you are on. I'd like it to work just like notepad++ where it doesn't display the number of rows not used yet.

Having played around with the JTextPane, i am still confused. in the following code, i want to put the symbol ">>" in front of every line that is typed. I am trying to use a key listener, which probably isn't the best way, but i figured it was a good time to learn. here is my code: