Hi I am new to java and for my first assignment in my java class we were to write a program which generated 4 semi randomly placed rectangles with semi random colors and sizes. Then when two rectangles are clicked on they are to switch places. I am using a constructor to construct all four rectangles and this portion of the code is working just as it is supposed to. However, the portion to switch the rectangles is not working and after looking at it for literally hours I can not figure out why. I am not completely new to programming as I have been in other courses as well but for some reason I am stumped. If you could please at least point me in the direction of my problem that would be great. I don't expect someone to tell me explicitly the problem but any help would be greatly appreciated as my assignment is due tommorrow. Thanks ahead of time.
The following is my code the second section being the constructor and the first being the class to switch the rectangles and such:
Add newlines to avoid very long lines[/edit]
[ September 15, 2008: Message edited by: Campbell Ritchie ]