The JavaFX Transition API lets you quickly create animation sequences based on object properties. The following code shows how to animate an object's x/y-rotation in space using the RotateTransition. The code groups two Circle shapes together using the Group class. Then, animates the group using the RotateTransition class (see result below).
When the code execute, you will see the circles rotate about the center of their junction.
Click here to see animation.