I'm using a JTextPane (plain/text) as a scrollable message board in a chatroom application.
Sometimes if a line wraps, the component does not show the bottom line as if it calculates the actual size of the control wrong. If you resize the container then the control gets bigger and displays the last line, along with the vertical scroll bar getting longer. You can then pull the scroll bar down to see the last line.
Is there a way to get the JTextPane component to always have the right size after text is added to its docment?
John Coleman, MSTA<br />Sun Certified Programmer for the Java� 2 Platform<br />firstname.lastname@example.org<br />Eurobase banking solutions<br /><a href="http://www.eurobase-international.com/banking" target="_blank" rel="nofollow">http://www.eurobase-international.com/banking</a>