tags:

views:

51

answers:

3

Hi, I need some advice on creating a syntax highligher for java application using swing. The application should allow to edit a file and highlight syntax.

I don't know the swing library, what should I look for?

+1  A: 

You could build on JEditorPane, but it might be easier to use the jedit syntax bean.

Simon Groenewolt
Haha you beat me to it with that jEdit thought. I was about to suggest using jEdit itself: http://www.jedit.org/api/index.html
amir75
@Simon (the OP), just for the record, JEditorPane does *not* support direct syntax highlighting: you'll need to parse the Java source file yourself and then highlight the tokens (no trivial task!).
Bart Kiers
+1  A: 

I use RSyntaxTextArea and it works great.

adrian.tarau
+1 Cool open source tool!!
Bragboy
+1  A: 

JSyntaxPane is quite active and supports a lot of languages (+ a friendly license).

Kirill