🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTextField Question

#7775
From: Stan Shargorodskiy
Date: Fri, 15 Dec 2000 22:30
26 lines
1823 bytes
If all you need is to guarantee that the user does not enter more than 50
characters in your text field, then you can use insertString(int offset,
String str, AttributeSet a) from PlainDocument.

"James A. Schulz" wrote:

> I should have said: "I know how to do this using 2D graphics, a glyph
> vector, and a character iterator..."
>
> thanks,
>
> James
>
> "James A. Schulz" <jaschulz@wiseware.com> wrote in message
> news:91dfpo$bl63@bornews.inprise.com...
> > I need to draw strings in fixed-width cells even if the font is not
> > monospaced.  I know how to do this using 2D graphics and a character
> > iterator.  Can I make a JTextField draw it's contents this way?  If so,
> can
> > somebody give me a clue as to how to do it?
> >
> > thanks,
> >
> > James
> >
> >
Technical Details
Message-ID: <3A3A9B88.15B6C2DA@netrisk.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!64.69.105.177
References: <91dfpo$bl63@bornews.inprise.com> <91dir5$bl89@bornews.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3a2ced565e921dc1
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2000-12-15 14:30:29 PST
Message-ID: <3A3A9B88.15B6C2DA@netrisk.com>
Date: Fri, 15 Dec 2000 17:30:32 -0500
From: Stan Shargorodskiy <sshargor@netrisk.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
To: "James A. Schulz" <jaschulz@wiseware.com>
Subject: Re: JTextField Question
References: <91dfpo$bl63@bornews.inprise.com> <91dir5$bl89@bornews.inprise.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.69.105.177
X-Trace: 15 Dec 2000 14:27:33 -0800, 64.69.105.177
Lines: 27
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!64.69.105.177