How to set fixed width but dynamic height on JTextPane?
<p>I want to use a <code>JTextpane</code> with fixed width but dynamic height which should also allow wrapping. The height should change as the user adds or removes text. I would've used a <code>JTextArea</code> but the text has to be styled differently. Is there an easy way to go about this problem? </p>