Article View: borland.public.jbuilder.java.swing
Article #7779Re: JTextField Question
From: James A. Schulz
Date: Fri, 15 Dec 2000 23:59
Date: Fri, 15 Dec 2000 23:59
41 lines
2228 bytes
2228 bytes
Stan, No, that's not it. My question wasn't very clear. I need to draw strings where each character is in a fixed width cell. As I said, I know how to draw this sort of string, but I need to teach the jtext field to draw that way. Any ideas? thanks, James "Stan Shargorodskiy" <sshargor@netrisk.com> wrote in message news:3A3A9B88.15B6C2DA@netrisk.com... > 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:
<91eb46$dns1@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mailReferences:
<91dfpo$bl63@bornews.inprise.com> <91dir5$bl89@bornews.inprise.com> <3A3A9B88.15B6C2DA@netrisk.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 15:58:53 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail From: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JTextField Question Date: Fri, 15 Dec 2000 17:59:32 -0600 Organization: Another Netscape Collabra Server User Lines: 44 Message-ID: <91eb46$dns1@bornews.inprise.com> References: <91dfpo$bl63@bornews.inprise.com> <91dir5$bl89@bornews.inprise.com> <3A3A9B88.15B6C2DA@netrisk.com> Reply-To: "James A. Schulz" <jaschulz@wiseware.com> NNTP-Posting-Host: user-33qtc0i.dialup.mindspring.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200