I'm using 3 combo boxes: origin, destination, and day. A guy I work with got a perfect GUI score; he did those 3 plus "max. price". I left out max price since the assignment said we only had to look for exact matches, and doing numbers would take extra work.
I populate them by creating a list of all the origins and destinations currently on the database. By using TreeSet, I built, sorted, and returned the list in 10 lines of code. I think dynamically building the list is the only way to go since you want the drop-downs to change as new flights with new airports are added. I hard coded the days of the week.
I was thinking about loading them from the datasource, but I didn't want to make to many assumptions about the size of the datasource. Are you loading the fields on separate threads upon server startup?
No, I'm not using any extra threads for this purpose. At first I considered loading them from the datasource, but since the GUI starts with all the flights anyway, I had no need to make the extra server call. In the GUI constructor, I use the data that is in the table and get the unique values from that. That way there is no additional load placed on the server.
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad: