title: Text editor with syntax highlighting and line numbers?
body: <p>This is a bit challenging even probably for a team project, let alone for a one-man implementation, but I was trying to put together a simple yet elegant text editor with syntax highlighting, using a <code>JEditorPane</code>. I stumbled upon <a href="http://ostermiller.org/syntax/editor.html"><strong>this</strong></a> which was discontinued and really hard for me to understand with all the lexer files and .lex stuff inside. I even found in some blog that this project was later taken on by some other team but even yet again discontinued. I don't need it to be too fancy, like having code folding and stuff (even though I am tempted to find out how to do this), but I need at least a <strong>basic syntax highlighting</strong> to exist and pretty much <strong>line numbers</strong> on the far left side just like Notepad++ for example. Keep in mind that I only need it to highlight Java source-code, at least for now.</p>
  
  <p>What I am looking for is either a tutorial, a well-documented example and sample code, a pre-made package, even a tool for NetBeans can do the trick, I do not neccesarily need the source code written from scratch, I just need an implementation that can be of use. Thanks in advance!</p>
  
  <p>P.S.This is not gonna be commercial or too big, don't ask why I want to reinvent the wheel when there are so many programming editors out there, I am learning and this came up as a nice exercise for me!</p>