M
Miguel De Anda
This is kinda strange, I was making a very simple "notepad" to use in a
larger application and I ran into this strange problem. When the window
(JFrame or JInternalFrame with a JScrollPane with a JTextArea inside of it)
gets resized, the TextArea object grows, but doesn't shrink. The way I know
this is that if I expand it horizontally, it does as expected, it allows for
more text. If, however, I shrink the window horizontally, I immediately get
a horizontal scrollbar, even if there is not text to the right. I've noticed
that I get this problem with most objects inside of the scroll pane. How can
I fix this?
larger application and I ran into this strange problem. When the window
(JFrame or JInternalFrame with a JScrollPane with a JTextArea inside of it)
gets resized, the TextArea object grows, but doesn't shrink. The way I know
this is that if I expand it horizontally, it does as expected, it allows for
more text. If, however, I shrink the window horizontally, I immediately get
a horizontal scrollbar, even if there is not text to the right. I've noticed
that I get this problem with most objects inside of the scroll pane. How can
I fix this?