Originally posted by Mark Spritzler:
Yes it is possible that the data might change, and hard coding the JComboBoxes isn't the best solution.
It is possible with the classes provided, and a little coding to get the unique values of any field, and use that to fill your JComboBoxes.
Mark
Ok, I can manage to get the unique values of any field dynamically from the database using a method in my Facade.
But I have to at least give the name of the field to this method.
Or maybe hardcode it in getDestinationAirports() wich can call the generic method?
Or maybe make a HashTable like Aleksey said :
Aleksey Matiychenko
ranch hand
Member # 11948
In my data class constructor I added a call to createFieldIndex method which populates a hashtable with names of the columns as keys and their index as values
Or maybe like Micheal Morris did make an inteface that have all the field names and their number?
...
/Daniela