Hello Steven:
First I would like to note that you have a couple of design problems (too much repeated code, and not following OO principles).
Here is your code with some design corrections (to avoid you MAYOR headaches in the future maintenance), and some notes on what you could do to get the squares moving...
Notes about the Square classes... you had duplicated code for every method of each class (RedSquare and GreenSquare) that is calling for maintenance nightmare in the short run (specially if you'r going to put more squares or other shapes in the app, so I rewrote the code to give you an idea of how you can organize your objects... Notice that i have put every getter/setter (that are common to all Squares) in the Square class, you can improve it further adding a property to the Square class named 'color' and asign it a value in the constructor of the object type you are creating... There are probably hundreds of different ways to do it, so here's mine.
Answering your question, check the comments in the 'mouseEvent' pieces of code.
Hope this helps...
Diego
[ November 11, 2007: Message edited by: Diego Pedrosa ]