Is it possible to display line numbers in JTextArea ? Please advise me how to write code in JApplet.
JTextArea
This might be helpful for you and This stack question also
Use this http://tips4java.wordpress.com/2009/05/23/text-component-line-number/