Article View: borland.public.jbuilder.java.language
Article #16928Re: Simulating animation (refresh problem)
From: Tom Heagy
Date: Tue, 05 Jan 1999 00:00
Date: Tue, 05 Jan 1999 00:00
28 lines
1806 bytes
1806 bytes
That was a good suggestion however I just tried it and it still doesn't repaint until the loop is finished. I placed the "repaint()" method call inside the loop immediately after the call to "setLocation(x,y)". I also tried the "paintAll" method with similar failure. The problem also seems to occur with simple TextControls. Any other suggestions? Perhaps someone knows of a working example that I could look at??? -Tom Max Polk wrote: > [This followup was posted to borland.public.jbuilder.java.language and a > copy was sent to the cited author.] > > In article <36913A34.40CCCC1E@sciatl.com>, tom.heagy@sciatl.com says... > > My problem is that the display doesn't refresh until the last move is > > complete (i.e. I'm out of the loop and control is passed back to the > > OS). I've played around with "invalidate" and "validate", but with no > > success. > > Have you tried repaint? (in)validate has to do with saying that the > component needs repainting whenever AWT gets around to it, which can be > much later. repaint has to do with saying that all pending paint > commands should occur right away. repaint sounds like what you want.
Technical Details
Message-ID:
<36920FC7.2DD0733B@sciatl.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,55c33f6eaaa49fd2 X-Google-Attributes: gidf74b3,public From: Tom Heagy <tom.heagy@sciatl.com> Subject: Re: Simulating animation (refresh problem) Date: 1999/01/05 Message-ID: <36920FC7.2DD0733B@sciatl.com> X-Deja-AN: 428998717 Content-Transfer-Encoding: 7bit References: <36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com> To: Max Polk <none@none.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language