Animations are simply "multiple images" which display as a sort of slideshow.
How to Use Swing Timers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)
Playing music is very vague. What music? Is it a wave file? An mp3 file? A midi file?
Java Sound Resources: Examples
I must note that the way the questioning is done here and the assignment is setup, I'd get the idea that people are confusing Java for Flash.