The user should be able to select the origin and destination of flights, and the display should update to show only flights that satisfy those criteria. The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature.
Is it advisable to use comboboxes for the origin and destination fields. I am currently using textfields for origin and destination. In this case the user is expected to type in the airport name. Is this OK? I mean I have seen people using comboboxes. But the instructions say that user MUST be able to describe enter....(what does describe enter here means?)...if using comboboxes u can only select but not type..AM I missing any thing here... Or should I use Editable JComboBox??? Thanks. [ September 01, 2002: Message edited by: Samual Harvey ]
Samual Harvey<br />SCJP2<br />SCJD2
Nate Johnson
Ranch Hand
Joined: May 13, 2002
Posts: 301
posted
0
I used combo boxes and received a good score... I missed 1 point on my GUI and they dont tell you why . Anyway, it is definitely easier to use combo boxes because you know what the values are and can easily check against those values. A textfield could be anything... I also added an "any" choice to the top of the combo for the wildcard requirement. Hope that helps,
I did what Nate did and got perfect on the GUI so you won't lose points for using combo boxes. And it's just good user interface design to use combo boxes if you already know all the possible choices.
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Mag Hoehme
Ranch Hand
Joined: Apr 07, 2002
Posts: 194
posted
0
Thanks you for your information (I've also been wondering how to do it).
Mag
Samual Harvey
Ranch Hand
Joined: Aug 06, 2002
Posts: 119
posted
0
Yes I have implemented the Jcomboboxes in editable mode. I have a question. I am trying to bring in the sorted and unique list of origin and destination. Any ideas how should I do this. I have a vector source for my combo boxes. I tried using HashSet but it does not work correctly. It removes some duplicates but not all. Is there origin/destination data in db.db different? Thanks.
Nate Johnson
Ranch Hand
Joined: May 13, 2002
Posts: 301
posted
0
Originally posted by Samual Harvey: [QB]I have a question. I am trying to bring in the sorted and unique list of origin and destination. Any ideas how should I do this. I have a vector source for my combo boxes. I tried using HashSet but it does not work correctly. It removes some duplicates but not all.[QB]
I used a TreeSet to get my values for the combo box... it is sorted and a set so I get unique and sorted values. I just walked through the values of the db and tried to add every one, and since it was a set, it rejected duplicates... not the most elegant solution, but Sun did not seem to care
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
Originally posted by Nate Johnson: I used a TreeSet...
Now I know you copied off my paper! Michael Morris