Animation4J is a library that is useful for creating animations in Java.
There is a sample project that uses Animation4J with Gradle.
I have put a video out on how to use this project.
Following, is a diagram of how an animation rig in Animation4J is structured.
An AnimationRig is the central object.
An AnimationRig is a collection of AnimationLimb s. These just contain an image of the limb and a collection of AnimationJoint s that lead to other limbs. The joints keep track of the angle to the next limb.
Every limb has some implementation of ILimbImageProvider. There are two ways this is typically accomplished, which is by either supplying a static image or by supplying a StopMotionController.
A stop motion controller functions by cycling through sprites from a SpriteSheet.