I'm not fully sure I understand what you're needs are, but assuming I do there are probably dozens of ways to accomplish it...its just how messy/clean/re-useable you want the code. One suggestion...
Type: Posts; User: copeg
I'm not fully sure I understand what you're needs are, but assuming I do there are probably dozens of ways to accomplish it...its just how messy/clean/re-useable you want the code. One suggestion...
Just call it when you stop your timer:
count++;
if(count > 50)
{
t.stop();
reset();
}
Your animate function is being performed on the event dispatch thread (EDT), and since all drawing/events/etc... is queued onto this thread, no calls will be performed until your function exits...