Flash, Photoshop, and AfterEffects are obvious go-to programs (though cost a lot). Gimp is a free alternative to Photoshop and does have animation capabilities as well. If you want it to look like pixel art, Graphics Gale has a free version that's really useful, and is actually fairly powerful animation wise. You could even use Paint and the older Win XP versions of Windows Movie Maker (the Vista and Win 7-8 versions are not worth the time). As a joke you could have a picture of a glass on your desktop, and use the free version Fraps to make a 20 second video of you drag-selecting the glass, cause the drag select is blue for Windows (at least in Win 7, I don't know about Win 8 ).
Anim8or can do what you want as well, I would make a glass with a solid object with a sand texture inside, leaving space between the sand and the glass. I would then add a semi-transparent, one-sided polygon, shaped like the space between the glass and sand, for the water. Then use a morph target that has the bottom of the water object at the top of it. Put the object in scene mode, start the object with the morph at "1" and then have it go to "0". Put the camera where you want and go.
This explanation is pretty bad, but if you want to use Anim8or, I would look into "Morph Targets", "Textures", and the "Scene Editor". I may try to give a better explanation if you interested and have more time.