I would not highlight text via paintComponent override. There is support for 
character/text manipulation in document views/renderers. Once I had to solve 
similar problem and ended up writing my own ParagraphView (or BoxView or some 
other view ... don't remember exactly) and parsing the document and setting 
character attributes which worked quite nicely. There were some minor issues 
like if highlight started in middle of the word, new character attribute group 
confused algorithm for line wrapping and it was breaking the word at the 
highlight boundary, but this could have been dealt with if needed as well 
(manually controlling the line break markers). I can try to dig out that code 
and make some small demo out of it if that sounds interesting, but it would 
take few days ...
[Message sent by forum member 'rah003' (rah003)]

http://forums.java.net/jive/thread.jspa?messageID=248996

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to