🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTextField Question

#7788
From: Stan Shargorodskiy
Date: Mon, 18 Dec 2000 14:13
26 lines
1788 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: <3A3E1B81.8D4F8B3E@netrisk.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!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-18 06:10:46 PST
Message-ID: <3A3E1B81.8D4F8B3E@netrisk.com>
Date: Mon, 18 Dec 2000 09:13:21 -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: 18 Dec 2000 06:10:18 -0800, 64.69.105.177
Lines: 27
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!64.69.105.177