Article View: borland.public.jbuilder.java.api
Article #2474Re: DrawString Question
From: James A. Schulz
Date: Thu, 09 Nov 2000 00:00
Date: Thu, 09 Nov 2000 00:00
32 lines
1465 bytes
1465 bytes
Joi,
I'm really new at this. How do I set the foreground color to the background
color?
thanks,
James
"Joi Ellis [TeamB]" <joi@aravox.com> wrote in message
news:8uen6i$5ku13@bornews.inprise.com...
> James A. Schulz <jaschulz@wiseware.com> wrote:
> > Why doesn't the code below effectively erase the "this is a test"
string?
>
> > public void paint(Graphics g){
> > g.drawString("this is a test",20,120);
> > g.drawString(" ",20,120);
> > }
>
> > P.S. what is the right way to erase a string?
>
> Hrm. I draw exactly the same string with the foreground color set to
> the background color. Your method won't work consistantly for
variable-width
> fonts.
>
>
> --
> Joi Ellis (TeamB)
> No direct email, please.
> For best results, post on news server newsgroups.borland.com!
Technical Details
Message-ID:
<8uevo3$a4m2@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8uek57$5ie6@bornews.inprise.com> <8uen6i$5ku13@bornews.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,3c0ed2c868557b65 X-Google-Attributes: gid1089d0,public From: "James A. Schulz" <jaschulz@wiseware.com> Subject: Re: DrawString Question Date: 2000/11/09 Message-ID: <8uevo3$a4m2@bornews.inprise.com> X-Deja-AN: 691747411 References: <8uek57$5ie6@bornews.inprise.com> <8uen6i$5ku13@bornews.inprise.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Reply-To: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.api