🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9613

Re: can't adjust columns in JTextField(newbie)

#9613
From: John Zukowski
Date: Mon, 21 Feb 2000 00:00
33 lines
1498 bytes
You may be running into an issue with the LayoutManager altering the
columns/width. For instance, if you are placing your JTextField in the North
panel of a BorderLayout, the columns are ignored and the component is stretched
across the screen.

To avoid this, place your JTextField in a Panel/JPanel and then add the JPanel
to the same place. This will preserve your desired width.

Keep in mind that the columns is just for visual width, not for number of
characters in component.

J



Tom-A wrote:

> i am new at Java so sorry for the dumb question. how do i adjust the columns
> in a text field. i tried to adjust it but it make no difference to the
> horizontal length of the text field. what am i doing wrong? what am i
> missing here? Any help would be appreciated.
>
> Thanks
>
> Tom A

--

John Zukowski
Get the jFAQs
http://www.jguru.com/jguru/faq/
Focus on Java @ http://java.about.com
Technical Details
Message-ID: <38B0E15C.81EEB2B6@jguru.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <887gap$h3v9@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,33503d7096356a33
X-Google-Attributes: gid111d45,public
From: John Zukowski <jaz@jguru.com>
Subject: Re: can't adjust columns in JTextField(newbie)
Date: 2000/02/21
Message-ID: <38B0E15C.81EEB2B6@jguru.com>
X-Deja-AN: 587835054
Content-Transfer-Encoding: 7bit
References: <887gap$h3v9@bornews.borland.com>
To: Tom-A <toma@mich.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: jGuru.com
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing