Article View: borland.public.jbuilder.java.swing
Article #7773Re: JTextField Question
From: Stan Shargorodskiy
Date: Fri, 15 Dec 2000 22:30
Date: Fri, 15 Dec 2000 22:30
26 lines
1835 bytes
1835 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:
<3A3A9B94.22C0FDB4@netrisk.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!europa.netcrusader.net!205.252.116.205!howland.erols.net!sunqbc.risq.qc.ca!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!64.69.105.177References:
<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:27 PST Message-ID: <3A3A9B94.22C0FDB4@netrisk.com> Date: Fri, 15 Dec 2000 17:30:44 -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:45 -0800, 64.69.105.177 Lines: 27 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!europa.netcrusader.net!205.252.116.205!howland.erols.net!sunqbc.risq.qc.ca!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!64.69.105.177