S
Sam
I'm working on a GUI which contains a couple of JTextAreas contained
in a JPanel with a border layout, one JTextArea occupying the north,
the other the center of the JPanel. The JPanel is contained in a
JScrollPane, which is in turn contained within a JSplitPane, left
side.
I have setLineWrap(true) for both of the JTextArea's mentioned above.
When I do this, the text lines wrap fine - even when I drag the split
pane border to the right to expand the viewing area. That is, the text
adjusts to the new (increased) size as one would expect. But when I
make the veiwing area smaller, the line wrap does not re-adjust to a
smaller area
This is awkward because every display from that point
on seems to assume the text therein is the width of the size of the
JSplit's width at it's widest point. It makes the text display start
in the middle of the text somewhere, forcing the user to scroll back
toward the left to see the display starting from the left margin. It
should be doing nauturally.
What can I do to correct this problem?
Thanks,
Sam90
in a JPanel with a border layout, one JTextArea occupying the north,
the other the center of the JPanel. The JPanel is contained in a
JScrollPane, which is in turn contained within a JSplitPane, left
side.
I have setLineWrap(true) for both of the JTextArea's mentioned above.
When I do this, the text lines wrap fine - even when I drag the split
pane border to the right to expand the viewing area. That is, the text
adjusts to the new (increased) size as one would expect. But when I
make the veiwing area smaller, the line wrap does not re-adjust to a
smaller area
on seems to assume the text therein is the width of the size of the
JSplit's width at it's widest point. It makes the text display start
in the middle of the text somewhere, forcing the user to scroll back
toward the left to see the display starting from the left margin. It
should be doing nauturally.
What can I do to correct this problem?
Thanks,
Sam90