View Full Version : java question


justthisguy
10-18-06, 11:10 AM
Anybody here a java programmer? Care to point me in the right direction?

I am building a GUI, and I have a background picture. It's a jpeg that I loaded in and displayed on a JPanel. Now I want certain things to happen when you click on certain areas of the picture. I don't just want to slap on a few JButtons on top of the picture because that would look bad.

So basically, is there an easy way to set part of the picture to act as a button?

Stryder
10-18-06, 11:58 AM
I'm not entirely familiar with Java's interpretation however I beleive what you are trying to look for is called an "Imagemap".

So if you do a search for "Java Imagemap" you should find information on what you want. You will need to use a paint program to work out the pixel sizes/locations of those areas you want to map.