Ive solved the error. The problem is in the paintcomponent method you should take the currentframe++; above the if statment. so first it incremets the frame then it test is current frame biger or equals otherwise the error will be
By the same construction of the for loop, i got an array out of range error. I mean i gets ++ till its smaller the array.lenght wich is 15 if "i" gets 15 the loop will stop but at the las it will make i++ and so the program try to operate with array index 16 that is not available.... how can i solve that error ?
whenever i type extends jframe implements actionlistener it says java interface needed and anytime there is jframe it says not found. whats wrong with it .i'm using a hp computer, help pls
I was wondering, because you placed counter++ before the call to paint the icon, would this program never actually paint frame 1, that's stored in index 0 of imageArray?
Hey thanks a lot for the tutorials, I learned a lot. Just in case anyone was wondering, you can get rid of the run-time errors by swapping lines 24 and 25.
Ive solved the error. The problem is in the paintcomponent method you should take the currentframe++; above the if statment. so first it incremets the frame then it test is current frame biger or equals otherwise the error will be
EldarMK2 1 week ago
Well the problem is i get only 14 indexes registered not 15.
EldarMK2 1 week ago
@EldarMK2 just subtract one from the maximum in the loop, I guess.
macheads101 1 week ago
@macheads101 nope,doesnt help
EldarMK2 1 week ago
@macheads101 or increment the current frame after calling it no?
Okagesamade213 1 week ago
By the same construction of the for loop, i got an array out of range error. I mean i gets ++ till its smaller the array.lenght wich is 15 if "i" gets 15 the loop will stop but at the las it will make i++ and so the program try to operate with array index 16 that is not available.... how can i solve that error ?
EldarMK2 1 week ago
whenever i type extends jframe implements actionlistener it says java interface needed and anytime there is jframe it says not found. whats wrong with it .i'm using a hp computer, help pls
MrPurplegirl79 2 months ago
8:50 - an errors.
MaXingTien 4 months ago
I always get an error at animator = new Timer(delay, this); but I have my delay int and my implement -.-
gr1mtoy6100 4 months ago
I was wondering, because you placed counter++ before the call to paint the icon, would this program never actually paint frame 1, that's stored in index 0 of imageArray?
Thanks for the tutorial
DLNebelim 9 months ago
@DLNebelim
Yeah it appears to skip a frame.
He should increment after painting.
RebelHQ 9 months ago
hi, thanks for your tutorial...
now i can make my animation.
but i want to ask you, how to save the animation to .gif?
broddeen 1 year ago
where do you get those images?
theMacBoy11 1 year ago
Hey thanks a lot for the tutorials, I learned a lot. Just in case anyone was wondering, you can get rid of the run-time errors by swapping lines 24 and 25.
veQue2 1 year ago 4
@veQue2 Thanks! You are right!!!
IssacBirariaru 1 year ago
hey do u think you could make an atm machine in gui ??
Christiano781 1 year ago
nice
benarfa4 1 year ago
Awesome....Thank you
robdemon 1 year ago