stop an Animation
How to stop an Animation when i start it tpo create a digital Signal for example:
for (i=0; i<t.length; i++) {
....
// random Gaussian Number
t =((random.nextGaussian())) ;
for (e=0 ; e>< 10000 ;e++){
g.fillRect(i*10,0*ma齭tab,10,10);
g.fillRect(i*10,-ma齭tab,10,10);}
...
....
}
...
}
[373 byte] By [
Mouni] at [2007-9-27 23:02:33]

Learn to use [code]-blocks before you post source code!!!
boolean running=false;
//...
void myMethod() {
//...
running=true;
for (i=0; running && i<t.length; i++) {
//...
// random Gaussian Number
t[i] =((random.nextGaussian()));
for (e=0; running && e><10000 ;e++){
g.fillRect(i*10,0*ma齭tab,10,10);
g.fillRect(i*10,-ma齭tab,10,10);}
//...
}
//...
}
}
void stop() {
running=false;
}
- Marcus Sundman