🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17838

Re: ez-question (tm): drawing a rectangle

#17838
From: Vernon McPherron
Date: Mon, 28 Sep 1998 00:00
21 lines
1383 bytes

Paul Gifford wrote:

>
>   Simple enough.  When I run the applet, I see the rectangles flash
> and disappear.  If I choose "Reload" from the "Applet" menu, they
> appear...that is, until the Applet Viewer repaints itself (e.g. after
> a minimize, or if it is brought to the front).  Then they're gone
> again.
>
>   I am calling this routine in the start() routine.  Is this not the
> right place for code?  Is it possible the rectangles are being drawn
> before the rest of the applet?  (which isn't much...just a panel).
>
>   This seems so simple...yet the answer eludes me...
>

Well my guess would be that when the applet runs repaint() method or the
paint() method, you are losing what you've written.  Try to add your
drawGrid() to the paint method.
Technical Details
Message-ID: <36100567.3C444B3C@xnote.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <360fff72.23835061@forums.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2fedadf2f849da9e
X-Google-Attributes: gidf74b3,public
From: Vernon McPherron <vernon@xnote.com>
Subject: Re: ez-question (tm):  drawing a rectangle
Date: 1998/09/28
Message-ID: <36100567.3C444B3C@xnote.com>
X-Deja-AN: 395770964
Content-Transfer-Encoding: 7bit
References: <360fff72.23835061@forums.inprise.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: vernon@xnote.com
Newsgroups: borland.public.jbuilder.java.language