I have a (uneditable) JEditorPane, that is used to display help texts of different lengths.
Is there any way I can dimension the JEditorPane, so that it has a constant width, and the height automatically adjusts to fit the text in without any spare lines or scrollbars.
A solution I was thinking of was to create an excessively tall JEditorPane, insert the text, get the number of populated rows and the row height, and redimension the JEditorPane accordingly... but there are no such methods in the API for getting the row information.
Does anyone know how I can achieve this - either with JEditorPane or JTextPane?
posted 12 years ago
I'm still stuck on this one. Anyone have any ideas?
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database