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.
It is possible to change the color and text formatting of some words of a text inside a JTextArea?
I made a little editor with that component, and that's the only thing I couldn't do yet.
I tried to change that class to inherit from JEditor pane, where I can colorize wathever I want with HTML. BUT, I wasn't able to get the funcionality that JTextArea provided: TabSize and RowHeaders that can show the line number (I wasn't able to retrieve the correct line height using html text... and I even had some trouble concerning caret positioning).
I tried to make a hack with the Highlighter class, but even changing the original source code from sun, I wasn't able to make some pieces of text appear with another color. In fact, they appear with the correct color, but behind the text.
Okay, I tried everything I could think of. Can someone give me a hand with that issue? That little thing caused enough pain.
The art of being crazy is to NEVER commit the crazyness of being normal.