I am thinking to make a simple robot app which would record all movements and clicks done by the use and then repeat them.

I can do that with a glasspane but my question is, would a GlassPane work if I tried to use the program while in a game? For example, world of warcraft since bots are popular in MMO's, what else could I use?

I know of mouse hooks, which based on c++ I think, but I do not know how to use them in java.
If that is the only way, can someone give me direction to an understandable document regarding using mouse hooks?

Thank you very much.