Hi, I saw many questions in this forum about the implementation of the gui search dialog. Often the question was whether to you use textfields or comboboxes. I think this is definitly not a question because comboboxes can be used in the same way as textfields. Make the combobox editable and you have a textfield. Furthermore the approach to use only comboboxes if much more user friendly because you can store unique input values of the user in the combobox so that if the user decides to do another search all previously entered criteria is still available and has not to be entered once again. Additionally if you want to provide prefilled comboboxes, meaning that all the distinct values of a db column should appear in a combobox provide flags to indicate that these values should come from the database and should not be entered manually by the user. I think this is the most flexible and most user friendly way to present the search dialog. JMHO. Best of luck... jay ----- SCJP2
i used 3 non editable jcomboboxes, and populated them with lists of unique and ordered values each time a new connection is successfull. i prefered that to hardcode the values or insert them (as i did with all magic values) in a ClientConstantsInterface.
Hi, this is how I understood the task: The implementation of the search method in the Data.class should work for any criteria. The dialog, however, must work for a specified set of criteria. Check your instructions! I feel that there are different assignments that require different search criteria. And that's how I implemented it in the GUI: My instructions required two search criteria. I had two combo boxes in my toolbar. On loading the data, the combos were filled with the respective options, in addition to the wildcard option. Hope this helps.
Joined: Sep 18, 2002
Hi, I did not want to cause any confusion about this. I just wanted to share my thoughts. My gui design and criteriaFind implementation is totally generic, this means you are not bound to the field structure of the supplied db.db file. I wanted to be as much generic as possible to support extending the assignment later on, like Sun says in the assignment. Therefore you can use any field for searching, any number of fields can be used for display in the dialog, and any field can be prefilled with distinct database values or not. greets jay