🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Simulating animation (refresh problem)

#16932
From: Tom Heagy
Date: Tue, 05 Jan 1999 00:00
59 lines
2825 bytes
Thanks for the suggestion but I was hoping to find something a bit simpler.  I'm
still a novice at JAVA and the "Multi-threaded Client/Server" Chess example is a
bit overwhelming to me at this point.

-Tom


Richard Wilkman wrote:

> 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: <369245A9.D444D8DC@sciatl.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com> <36920FC7.2DD0733B@sciatl.com> <36923818.C234B7B1@inprise.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: <369245A9.D444D8DC@sciatl.com>
X-Deja-AN: 429068578
Content-Transfer-Encoding: 7bit
References: <36913A34.40CCCC1E@sciatl.com> <MPG.10fb2a0dae6a30af9896a8@forums.borland.com> <36920FC7.2DD0733B@sciatl.com> <36923818.C234B7B1@inprise.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language