Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JTextArea setLineWrap problem

Reply
Thread Tools

JTextArea setLineWrap problem

 
 
Sam
Guest
Posts: n/a
 
      06-14-2004
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
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-14-2004
On 14 Jun 2004 08:38:18 -0700, Sam wrote:

> I'm working on a GUI ...


<http://www.physci.org/codes/javafaq.jsp#cljg>

> What can I do to correct this problem?


Check the GUI FAQ for possible solutions
<http://www.physci.org/guifaq.jsp>
If that fails ro provide an answer,
put an SSCCE to the appropriate group.
<http://www.physci.org/codes/sscce.jsp>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JTextArea width problem Neutrino Java 2 11-08-2004 08:25 PM
Problem with JTextArea autoscroll DW Java 2 02-20-2004 01:52 PM
Re: JTextArea text is double-spaced? bad_knee Java 2 07-14-2003 05:23 PM
Re: JTextArea text is double-spaced? bad_knee Java 0 07-13-2003 10:24 PM
Tab key on JTextArea Ahmed Moustafa Java 1 06-28-2003 03:25 PM



Advertisments