Hi, My assignment is Home Improvement Contractors, In the DB interface the method for find is // Returns an array of record numbers that match the specified // criteria. Field n in the database file is described by // criteria[n]. A null value in criteria[n] matches any field // value. A non-null value in criteria[n] matches any field // value that begins with criteria[n]. (For example, "Fred" // matches "Fred" or "Freddy".) public int find(String criteria); In the design i should have the JComboBox with the fields in database file to search for particular field or i should have a textfield for each field so that the user can search for the combination of fields. If any one who had done this assignment earlier could suggest me the way they implemented. Thank You, Bharat.
Hi Bharat Welcome to JavaRanch. Please change your displayed name to match the JavaRanch naming policy. You should display your last name, and either your first name or the initial of your first name. You may change it here. There has been at least one case in the past where people have failed their assignments, and a comment from the examiner was that the user did not provide JComboBoxes. I have not heard of any problems the other way though - people providing only JComboBoxes do not seem to have any problems. (I did the older assignment (Fly By Night Services) and only had JComboBoxes. My GUI got 100%.) So I would definately recommend JComboBoxes. Regards, Andrew
hi Andrew, thanks for your suggestion. is it o.k the displayed name now. One more question the original interface DB provided by sun does not have any methods for getting the list of contractors. i have seen many posts that we should not modify the original interface, now i am having one more interface called DBMain which extends DB, in my Data access file i am implementing DBMain. But in instructions it says Your data access class must be called "Data.java", must be in a package called "suncertify.data", and must implement the following interface: Is that Data Access class should implement DB only. Thank you, Bharat.