🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: text field size

#11017
From: Matt Krevs
Date: Mon, 19 Jul 1999 00:00
19 lines
1099 bytes
working from memory (always dangerous)

I think you need to write your own DocumentListener and override
insertString()

David <david.v.clark@lmco.com> wrote in message
news:378F6836.AFB9850F@lmco.com...
> Good day -
>
> Using JBuilder 3 Enterprise:
>
> I have a JTextField that users can enter values into.  I would like to
> restrict the number of characters that they can put in.  How can I limit
> a field to only allow the first 4 characters typed in ?
>
> Thanks in advance for your help.
>
> David
>
Technical Details
Message-ID: <7mtp2u$dku7@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <378F6836.AFB9850F@lmco.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f3503c46f47fbc5f
X-Google-Attributes: gid111d45,public
From: "Matt Krevs" <mattkrevs@flex.com.au>
Subject: Re: text field size
Date: 1999/07/19
Message-ID: <7mtp2u$dku7@forums.borland.com>
X-Deja-AN: 502534031
References: <378F6836.AFB9850F@lmco.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Reply-To: "Matt Krevs" <mattkrevs@flex.com.au>
Newsgroups: borland.public.jbuilder.java.swing