This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I've found the most confusing aspect of the project to be designing a GUI using Swing. At the moment I'm trying to create a JDialog used for searching.
I have a SearchDialog class, which extends JDialog . This returns a container object called SearchCriteria with the name and location for the search.
In the constructor for SearchDialog, there's a call to this.setVisible(true). Is this the "correct" way to do this, or should it be called from the class which instantiates SearchDialog.
In the UI requirements Sun says:
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
I've noticed others have been confused by this. What's the general take? My application currently has one button to "Retrieve all" (ie. search for all records), and another to perform a name/location search.
I think this topic has been discussed before, but it seems the general answer is not clear or satisfactory.
Consider the requirement again "It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
I think the second part for records "where the name and/or location fields exactly match values specified by the user" is quite clear
However notice the wording of this requirements.. there is a "OR" One must allow user to search the data for all records OR. In a logical sense, one could have interpret the English meaning as.. if you do the former..u can ignore the latter.. since it is a OR not a AND requirement.
I guess the only unclear thing is when implementing the former - must allow the user the search the data for all records.
TO me, the first layman approach would be to have six field jtextboxes that allow user to search either by name,location,specialties,size,rate and owner.
However, there is another approach to it, you could have only a jtextbox that search any data (regardless of fields) that matches the record.
Or last, implement both the former and latter (requirements)
Can anyone who has already passed the exam comment on this OR share with us the gui display of the search panel.
I am working on similar assignment and have same requirements.
The find method in DBMain interface says:
// 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)
First, the number of criteria elements MUST not exceed number of fields in one record in DB. This find method should be at DB layer and could be used for both (alone, server) modes.
For search, GUI part says: "It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
Now here we need records not their physical location numbers in DB after search is done. I think the first half of above statement simply means bring all records from the DB and second half means that search is based on both name and location or any one of them (when second/first is null/empty).
The search JDialog box which I designed has two text fields (name, location) and two check boxes (Select All, Case Sensitive). Case Sensitive check box works in case of field based search only.
This is my understanding, specifications are quite confusing. I am also skeptical about many such things.