Article View: borland.public.jbuilder.java.api
Article #2471Re: DrawString Question
From: Joi Ellis [TeamB]
Date: Thu, 09 Nov 2000 00:00
Date: Thu, 09 Nov 2000 00:00
19 lines
1107 bytes
1107 bytes
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:
<8uen6i$5ku13@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8uek57$5ie6@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: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: DrawString Question
Date: 2000/11/09
Message-ID: <8uen6i$5ku13@bornews.inprise.com>
X-Deja-AN: 691688753
References: <8uek57$5ie6@bornews.inprise.com>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.api