0

I have a large amount of images drawn onto a screen, i need to detect when one is clicked. The problem i have is that different classes draw different images. I need certain mouse clicks to interact with certain classes. How can i do this? Should i create my own MouseHandler class? How will this talk to certain classes?

Thank you in advance

user1724416
  • 914
  • 2
  • 11
  • 24

1 Answers1

-1

If you draw every image on the same panel, you will need to detect which image was clicked on your own. On the otherhand, if a single image is drawn on a single panel, you can use a different MouseListener for each individual panel.

Clark
  • 1,357
  • 1
  • 7
  • 18
bongo
  • 733
  • 4
  • 12
  • 2
    Consider editing your answer to remove all non-standard abbreviations. It's hard enough to understand folks here that you really don't want to make it any more difficult than it has to be. Also please remember that for many folks here, English is not a first or even second language. Please don't make it too difficult for them to understand you. – Hovercraft Full Of Eels Nov 03 '12 at 18:38