Originally Posted by
cchase88
What I'm trying to create is a map program in which an image is loaded and on top of this image buttons are placed on specified areas, so that when a user clicks these buttons, a pop-up box will be displayed with information about that area/building. I would like the image along with the overlaying buttons to be in a JScrollpane and I will be adding click and drag support so the scroll bars aren't the only way to navigate around the map. I'll be adding this scrollpane to a JFrame which will also have a panel that holds controls.
I've tried using a JLayeredPane to hold a panel with the image, and then add the buttons over it, but I can't seem to get the buttons to draw correctly. I've also tried using the OverlayLayout, but without much success.
I was wondering if anyone could point out a better technique of developing an application like this. Should I be using Java2D instead of the methods I've tried?