The ‘swing’ animation needs to exist in the Animations list for it to play. It’s a weird quirk with the Animation system - it only plays animations that are in the Animations list even if you properly reference them.
The Animation component is the legacy way of doing things. The Animator component is the new way. You shouldn’t add both components. I suggest you only use an Animator component - the animations are set up by adding states to the controller.
No, I didn’t mean to imply that it would. You are referencing the Animation component in your script which, of course, won’t work without an Animation component on the game object
As I said, if you want to use the Animator component you need to set up the state machine in a meaningful way.
If you need general information about the animation system, the manual probably has all the information you need.
Also, if you still want to use the legacy animation system it seems like @RedVonix has already answered the question.