This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I would like to display some Java source code using a JTextPane. Furthermore, I would like to color-code the JAVA keywords to make it easier to view the source file. My questions are: 1. What's the easiest and most efficient way to parse an entire JAVA source file to find the JAVA keywords (e.g. if, else, while, class, etc.)? 2. Would a JTextPane be the best GUI component to use? Thanks, -Peter