posted 13 years ago
Ok, Ive changed my implementation a little bit. I got rid of Java2D and am just using JApplet and Swing right now. Currently I have two problems with my code. I want to create a dynamic number of squares so I have an objects with several functions in it that I need to store x and y positions and such. I would like to create an array of these obects so I can have multiple squares. The code builds without any errors however when I run it I get error when I try to paint the square (Line 162).
My second problem is moving the square. I put a simple if statement in to check if the mouse event is within the boundaries of the square that I am trying to move however when I try to drag the square the motion is wrong. Any ideas?