• Post Reply Bookmark Topic Watch Topic
  • New Topic

Attaching MouseListeners.....  RSS feed

 
Chris Beech
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I'm trying to write an app whereby a user can click on any one of a number of rectangles (all drawn by the Graphics.drawRect(.....) method) move the mouse and click again and the rectangle will move to the new place.
The problem is that I can't find a way to identify whether the user has clicked inside a rectangle or not.
Any pointers would be gratefully appreciated....
Thanks,
Chris
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!