4

I'm working on a basic text editor and I would like to implement some basic syntax highlighting into the JEditorPane (or any other kind of text area). I'm fairly new to Java and I've searched and can't find much information on it. Any help is very, very, very much appreciated!

Community
  • 1
  • 1
NardCake
  • 130
  • 2
  • 9
  • Can you highlight specific parts of the text at will? If yes, then I recommend setting a word dictionary, compare against the text in your Area and when you don't find it, then highlight! – gtgaxiola Sep 24 '12 at 23:37
  • 4
    You could check out http://stackoverflow.com/questions/864688/where-can-i-find-a-syntax-highlighting-library-for-java and http://stackoverflow.com/questions/1853419/syntax-highlighter-for-java and [jsyntaxpane](http://code.google.com/p/jsyntaxpane/) (I know you said `JEditorPane`, but it might give you jumping off point) and http://stackoverflow.com/questions/3635606/syntax-highlighting-in-jeditorpane and [Simple Syntax Highlighting](http://explodingpixels.wordpress.com/2008/05/17/simple-syntax-highlighting/) for starters :) – MadProgrammer Sep 24 '12 at 23:46
  • Alright thanks for the referrals. – NardCake Sep 24 '12 at 23:54
  • 1
    @MadProgrammer I think that comment should be the answer. – mattbdean Sep 24 '12 at 23:57

0 Answers0