Moving a rectangle on mouse click


Assignment:

Write an application that draws a rectangle within a panel as shown

1415_mouse click.JPG

When user clicks in a point left of the rectangle, it moves 10px to left. It also moves to right by 10px if user clicks on a point right to the rectangle. Clicking in any other areas such as above, inside or below the rectangle will do nothing.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Moving a rectangle on mouse click
Reference No:- TGS01927223

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)