-
Project Guidance
Hi, I'm looking for some advice on a java project I have to complete for a class I'm taking.
Basically I'm not really sure where to start but here is a little background info and any advice would be greatly appreciated.
I have to create a program that will allow a user to input sever locations (city, state, zip) and it has to be using a GUI. In addition the user has to be able to edit the list of locations, ex. add, delete, reorder. So far i've managed to make a simple GUI with 3 different text boxes which ideally they will put city in the first one, state in second, and zip in third. But after they enter the location the program has to retrieve the latitude/longitude so it can be plugged into a URL which should bring us to a website where we can retrieve the information via XML. I'm not really worried about the XML part yet, mainly i'm just concerned with getting the GUI up and running.
I was wondering if anyone can give any insight on how to make a list where the program can retrieve the different locations, and how to add, delete, and reorder.
Thanks in advance!
-
Look into the LinkedList API. As for lat/lon, You can use the google API (requires some XML parsing, but fairly simple).
-
To associate a city with a latitude and longitude, you need to use a Map....I would use a TreeMap<String, MetaData> (where MetaData is a class you will define that contains lat lon...but can be extended later on to add more information without requiring a lot of rewrite) , since it's an efficient algorithm.