I have a JTextPane
with HTML text.
I used GroupLayout
(using WindowBuilder).
I've set the minimum size of my JFrame
to 800x600 so the user cannot make it smaller than that.
The app has a big scrolling JPanel
the size of the entire window. The top part of the panel is taken up by a JTextPane
wrapped in JScrollPane
. I have disabled the scroll bars and sized the JScrollPane
to make the entire text visible.
In group layout the JScrollPane
is set to stay constant vertically, but size horizontally.
My issue is that when the user makes the window larger the JScrollPane
also expands, but now there is a big white space left at the bottom of the text pane. Is there a way that I can make JTextPane
shrink to fit its contents.
Also if you suggest a different layout, I would be willing to try it.