Results 1 to 2 of 2
Thread: Making a map program
- 12-05-2010, 10:52 PM #1Member
- Join Date
- Dec 2010
- Rep Power
Making a map program
Hey everyone, I've been trying to create a simple map program using different methods, but they have all fallen short.
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?
Also, I would solve one issue at a time in isolation of the others though rather than trying to solve the whole thing in one big huge program.
- By 3c4hy0 in forum New To JavaReplies: 11Last Post: 08-13-2010, 01:08 PM
- By cid in forum New To JavaReplies: 4Last Post: 06-30-2010, 08:22 PM
- By pheonix in forum Advanced JavaReplies: 4Last Post: 04-18-2009, 07:36 AM
- By Lifeis2evil in forum New To JavaReplies: 2Last Post: 12-10-2008, 04:10 AM
- By TheDarkReverend in forum Advanced JavaReplies: 2Last Post: 11-28-2008, 05:50 AM