-
Java Applet
How can i stop an Animation when the Program still works under a FOR statement--->for
(i=0;i<1000;e++).
I have Start Button
And Stop Button.
I want to clear directly the Animation, not untill the for-Statement finisched.
-
Re: Java Applet
Use the break; statement inside the for loop.
In the sample code that you have provided, (i) variable doesn't get incremented
instead (e) gets incremented. [I'm not sure sometimes u may have incremented
the (i) var inside the loop ]
Hiranya Samarasekera
[www.theFutureMinders.com]
----------------------------------
"Mounir" <abbas@gmx.de> wrote:
>
>How can i stop an Animation when the Program still works under a FOR statement--->for
>(i=0;i<1000;e++).
>I have Start Button
>And Stop Button.
>I want to clear directly the Animation, not untill the for-Statement finisched.
-
Re: Java Applet
"Mounir" <abbas@gmx.de> wrote:
> Dear;
do not use "for loop" in the main thread for animation, because it will block
the System, rather make a new thread which will handle the animation
>How can i stop an Animation when the Program still works under a FOR statement--->for
>(i=0;i<1000;e++).
>I have Start Button
>And Stop Button.
>I want to clear directly the Animation, not untill the for-Statement finisched.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks