What's the best practice to play animation & sound in intellij plugins?

I’m thinking about adding some fun animations & audio effects to intellij. It would be nice if I can get the Graphics2D object of the editor