JTextPane refresh problem under jdk 1.1.8 swing 1.1.1
I have a JTextPane under the content type "text/plain". I use the
setCharacterAttributes to change the attributes of a portions of a text.
DefaultStyledDocument doc = (DefaultStyledDocument) textPane.getDocument();
doc.setCharacterAttributes(offset, length, activeAttribute, false);
// Refresh the display the hard way
When i do so, the text disapear (it takes the color of the background, in my
case white). If i reselect the text with my mouse the text reapear with the
proper attributes. I tried to refresh the JTextPane component but to no
Under jdk 1.2.2 and jdk 1.3 i don't have that particular issue (so it's
mostly a swing 1.1.1 problem as far as i can see).
Is there a solution to force a refresh everytime i change the attributes of
the text in the JTextPane?
Thank you in advance,
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL