Original Post
Im trying to write a program that will color code certain keywords, kinda like an IDE.
Whats the best way to implement styling in a textpane? Currently I''m checking the entire document via a DocumentListener and removing/inserting strings with the correct styling. This is extremely cpu intensive and I was wondering if there was a better way or if anyone knew of a class someone has written that lets me do something like setWordStyle("cat","red");