I wrote up a simple example of how to add a Swing Component to an existing Swing application that has code syntax highlighting based on an older version of JEdit.  I guess, in some respects, this might resemble a RichText control in the Microsoft world.
 
http://www.retroevolution.com/beta/syntaxjavapanel/