Java GUI Lesson 9 | Animation With Frames

preview_player
Показать описание
a simple way for doing animation in java with 15 frames
Рекомендации по теме
Комментарии
Автор

Great guide! :) Thanks for sharing; I've learned more by watching YouTube guides than I've learned from the lectures at my university.

ozmodiar
Автор

What's with all the repeat errors/warnings?

bberg
Автор

great video thanks!! just one little thing, you should put the currentFrame++; after the paintIcon command, because it never paints frame0.png the way it is now :)

yiannisapollong
Автор

WOWOWOWOW I'm so glad that I found a guy like you here. I was just watching your graphics tutorial, but seeing this, omg!!! can you explain more about this, Frame, how di you get these frames ???

shpenddbajgora
Автор

@EldarMK2 just subtract one from the maximum in the loop, I guess.

macheads
Автор

cant we simply import gif file to have animated image .. i tried it and its working perfectly

jonassx
Автор

Im sure its something I am doing this is the second tutorial on animation  that hasn't worked, but using print out to show where I all I am getting it shows I hit every method needed. I have tried using an array of images before and using the same for statement and all an couldn't get my array of images to work. Also I have read in several Java books that you have to add the Image Icon to a JLabel in order to get it to work. Anyways Im going mad nuts right now it works on your screen so it should work on mine. Feel like a tweaker combing the carpet, picking through your code.

MrClinton
Автор

"He is eating the cheeseburger and its wonderful" Bahahahaha

vasiq
Автор

@macheads101 or increment the current frame after calling it no?

Proggerino
Автор

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

MrPurplegirl
Автор

hey do u think you could make an atm machine in gui ??

Christiano
Автор

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
Автор

But... where does the animation get teh images? I don't understand...

BlackFiredDragon
Автор

I always get an error at animator = new Timer(delay, this); but I have my delay int and my implement -.-

grmtoy
Автор

Thank you! You managed to do in 9 mins what thenewboston took 4 videos! Not only that but your way takes like 100 lines less code. Really great. Oh and btw, for some reason the .png images i made in photoshop were not working, but some i made i paint were... Anyone know why?

PeopleThatPlayGames
Автор

How to make frames like that? A burger and A monster?

kmmed
Автор

hey i got an error on super.paintComponent(g) does anyone know?

benedictthen
Автор

You don't hava to have a Timer....

try using this in placement of a timer. It's a function.

public static void pause(int a){
try{
Thread.sleep(3000);
}catch(Exception exc){
}




now to use it in your other function just use this:

pause(3000);

ryanpvw
Автор

AHHHH my Timers never FUCKING WORK there is never allowed any arguments with it.

MrJohnboyofsj