Originally posted by Jeffry Kristianto Yanuar:
I used socket connection too, I thought I'm the only one who likes to burdening myself by using socket.
Originally posted by John Donoghue:
If you want to make sure some resource is correctly handled (like shutting a file), take a look at addShutdownHook() in java.lang.Runtime. This registers methods that run as the JVM shuts down, regardless of how the shut-down is initialized (closing the GUI, the user pressing Cntl-C etc.). The SCJD book by Monkhouse & Camerlengo contains a nice description of it.
1) The requirements for the GUI functionality in the B&S state that it must allow CSRs to search contractors and book a specific record. Now, is it necessary (for the purpose of the exam) to offer the CSRs a "Remove book" functionality as well?
2) In the Search part of my GUI, the user can search for all records or for records that exactly match values specified by the user regarding the name and/or location fields. Then, I�m thinking of putting two comboboxes, one containing the names of all contractors and one containing all the locations, and the user simply selects one or both of the comboboxes e clicks a search button. Consequently, the search operation is less error-prone, as opposed to simply offering a textfield input control. Any shortcoming with this solution?
3) The DB file description says: "(...) you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them." I don�t know if I understood this specification..., In my GUI, a CSR selects a register in the table, clicks a "Book" button and the application shows a dialog asking for the "customer id number", which will be used to book the selected register in the database file. Is this solution OK with the above specification?