Article View: borland.public.jbuilder.java.swing
Article #9008Re: paint
From: Paul Furbacher [TeamB]
Date: Tue, 30 May 2000 00:00
Date: Tue, 30 May 2000 00:00
20 lines
1245 bytes
1245 bytes
steve wrote:
>
> I have an application that extends JFrame. When I resize it the paint
> method fires twice. Is this a feature or a bug? My paint method looks
> like this:
>
> public void paint(Graphics g)
> {
> super(g); // call parent paint
> pnlCanvas.draw(g); // call draw method in other class
> }
Off the top of my head, I don't know if it's a feature. What
happens when you comment out the "pnlCanvas.draw(g)" line?
If it paints twice, then that's probably the way it was designed,
although it seems a bit odd. But if it only paints once, then
you have to look at what you are doing in your "draw()"
method.
Paul Furbacher (TeamB)
Technical Details
Message-ID:
<39347BB5.C5E84E4C@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<393153BB.D4559776@erols.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,1f4ff6baf79110a0 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pnf@home.com> Subject: Re: paint Date: 2000/05/30 Message-ID: <39347BB5.C5E84E4C@home.com> X-Deja-AN: 629285572 Content-Transfer-Encoding: 7bit References: <393153BB.D4559776@erols.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii Organization: Reverse Alchemy, Inc. Mime-Version: 1.0 Reply-To: pnf@home.com Newsgroups: borland.public.jbuilder.java.swing