A suggestion for better text support
Swing becomes very slow when you try to use a large styled text (say 2mb) on the JEditorPane/JTextPane. Since my application supports it i've tried to evade this problem by creating a buffering solution for the JTextPane class, so that there are no more text views loaded at once than those that the interface needs.
I've failed. I needed to count the visible text length on the JTextPane view, but to do it i had to replace the paint method of the views, to update a shared variable that i'd use to get the length of the text. The problem was that the i couldn't reset the variable in all the situations when the variable went invalid, i don't know if due to my poor skills or due to the way that swing paints text.
My suggestion is this: add an utility method to the JText* classes to get the length of the visible text, or better yet, fix the text view model to do updates when invalidated. I think it would make swing more responsive.
Message was edited by: i30817