Hi, The sun requirement says 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. I am in bit confusion with above spec. I divided above with 2 points 1. The user should be able to select the origin and destination of flights 2. 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. From the point(1), I am thinking of using combo boxes for selecting Origination & Destination Airport locations. If I use the JCombo boxes how can I do the point(2) i.e how can the user enter "any" or "wildcard-like feature". Since I am thinking of filling the Jcomboboxes directly from the "db" data, I am in confusion with this requirement. I appreciate if somebody can clarify the above requirement. Probably I may be interpreting wrong. Thanks Jyothi
Hello, With a combo box you would fill it by selecting all the distinct values from the database. Since you wouldn't know how many going to values you were return you would probably use a Vector to store the results. Why then don't you just add your "any" wildcard to the Vector before you begin your search for distinct values. How you dealt the the "any" in criteraFind() would be up to you. Hope it helps Ian
Nothing stops you from adding an "ANY" entry to your combo box and treating it as a special case. By the way, I'm not so sure it's a good idea to handle it in criteriaFind() itself - arguably, it's a user interface feature rather than a Data API feature. - Peter
You have to be odd to be #1 - Seuss. An odd little ad:
Devious Experiments for a Truly Passive Greenhouse!