How can I animate a sprite sheet in Java

I have a REALLY big kirby sprite sheet for a game I’m making for my friend. I’m not sure how to animate one line at a time when i press certain buttons like “up,down,left,right,z…” etc. Any tips?

Have a look at Walkerboystudio

Scroll down to the section with the heading “Unity Tool Development Project 3 - in HD” and
have a look at part 14 to part 31.

That should be what you are looking for.