Article View: borland.public.jbuilder.java.language
Article #16934Re: Simulating animation (refresh problem)
From: Alexander Anguiano
Date: Tue, 05 Jan 1999 00:00
Date: Tue, 05 Jan 1999 00:00
30 lines
1636 bytes
1636 bytes
try Rectangle rect = component.getBounds(); rect.x=0; rect.y=0; component.paintImmediately(rect); Alexander Anguiano www.matrixcomputing.com Tom Heagy wrote in message <36913A34.40CCCC1E@sciatl.com>... >I'm having difficulty with a seemingly simply task. I'm working with a >couple of transparent image controls. I wish to move one of them across >the other (both are on the same panel) a small amount at a time in order >to simulate animation. To be more specific, I have a "game board" that >I wish to move a "Game Icon" across, but I only want to move 1 space at >a time. > >I attempted to do it by changing the coordinates of the tranparent image >and then delaying a short time before changing the coordinates again. >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. > >Any/all suggestions would be greatly appreciated. Feel free to e-mail >me directly at tom.heagy@mindpsring.com. > >Thanks in advance! >
Technical Details
Message-ID:
<76tl23$slv@bgtnsc03.worldnet.att.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36913A34.40CCCC1E@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: "Alexander Anguiano" <alexandera@matrixcomputing.com> Subject: Re: Simulating animation (refresh problem) Date: 1999/01/05 Message-ID: <76tl23$slv@bgtnsc03.worldnet.att.net> X-Deja-AN: 429092325 References: <36913A34.40CCCC1E@sciatl.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: AT&T WorldNet Services Newsgroups: borland.public.jbuilder.java.language