Hello,
I’m quite new here and this is my first post i think.
I’ve looked at lots of topics in this forum and I must say that is the best one that could probably answer my question and help me.
I must make a sort of ImageMap like in HTML or JavaScript.
Some Examples:
and
but I can’t find out how do do this.
I searched a lot but unsuccessfuly.
What I need?
Well I’m in a small game development where you have to klick around quite a lot.
And for the map i already have the images but I have to put them together give on each of those an MouseListener and see when the mouse is over an image is should highlight (probably a second image will take this role) and if the image is klicked it should perform the next action (e.g. System.out.println(“Image klicked!”); or something)
my biggest problem is that i have to give all these images together so that is looks like a map seen from above (2D).
And then the second problem is my MouseListener. how to put it on a image.
I hope you can give me some advice and/or code.
Thank you,
Joe