Why do my pokeballs shake in the battle menu?

I've noticed, when I'm in a battle, that certain pokeballs shake back and forth.

I'm not talking about when I throw a pokeball to capture a pokemon. I mean when in the middle of a battle and on the bottom screen of the DS where the commands are like in the screenshot I provided.

What is the significance behind my pokeballs shaking?

Pokemon battle screen


It means that that Pokémon has almost enough experience to level up.

I assume that switching to them and winning the battle will give them enough experience, but I can't be sure.