Article View: borland.public.jbuilder.java.swing
Article #10111Re: How to set size of JTextArea?
From: enisoc
Date: Mon, 08 Nov 1999 00:00
Date: Mon, 08 Nov 1999 00:00
27 lines
1704 bytes
1704 bytes
hmm.. if the textarea is only one line, i'd guess the scrollpane would be set to flowlayout. if you must have the flow layout, you can set the preferred size of the textarea. if you set the scrollpane's layout to border, the textarea should fill the entire right half of the panel. if you want to have space between the textarea and the edge of the panel, use a gridbag layout for the main panel and set insets for the scrollpane's side of the grid. Alex Colic <acolic@yahoo.com> wrote in message news:8075d9$4jn4@forums.borland.com... > Hi, > > I am using a JTextArea in an applet of mine. The panel is using a two column > grid layout. In the first column I have a label. In the second I have a > JScrollPane and in that I have a JTextArea. Right now, the JTextArea is > showing only one line. When I type into it, the JTextArea does not word > wrap. I have tried setting the setLineWrap to true, the setrow and setColumn > properties but I have not been successfull. I would like to set it up so > that the JTextArea is 5 lines high and that once the user starts typing in, > the lines wordwrap. Any help is appreciated. > > Alex > >
Technical Details
Message-ID:
<807a3l$4ji5@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8075d9$4jn4@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9cc6a19b03b97688 X-Google-Attributes: gid111d45,public From: "enisoc" <anthonyy@surfree.com> Subject: Re: How to set size of JTextArea? Date: 1999/11/08 Message-ID: <807a3l$4ji5@forums.borland.com> X-Deja-AN: 546037322 References: <8075d9$4jn4@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing