Article View: borland.public.jbuilder.java.language
Article #16930Re: Simulating animation (refresh problem)
From: Richard Wilkman
Date: Tue, 05 Jan 1999 00:00
Date: Tue, 05 Jan 1999 00:00
50 lines
2472 bytes
2472 bytes
Tom: The chess example has simple animation as you move the pieces. You might want to look at that. -Rich Tom Heagy wrote: > > 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. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<36923818.C234B7B1@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com> <36920FC7.2DD0733B@sciatl.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: Richard Wilkman <rwilkman@inprise.com> Subject: Re: Simulating animation (refresh problem) Date: 1999/01/05 Message-ID: <36923818.C234B7B1@inprise.com> X-Deja-AN: 429049624 Content-Transfer-Encoding: 7bit References: <36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com> <36920FC7.2DD0733B@sciatl.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language