|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Not sure offhand why the LineWrap settings would cause
a problem. But have you tried using
GridBagConstraints.fill = both, to allow the JTextArea
to remain fully visible in its display area?
Second, when are you setting the text that will appear
in the JTextArea? You said that you want the
JTextArea's size to be calculated by the amount of
text present. Once a JTextArea's size is set, it's
set. I haven't yet found a reliable way to
dynamically resize a JtextArea, and I've looked for
one! So if you are passing the text to the JTextArea
in the constructor, then the size of the JTextArea
might get set properly. I you are attempting to pass
text to the JTextArea *after* it's been constructed,
however, then don't expect its size to change
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.