This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I want to make sure, that however the User quits the GUI, a certain method is being called. I have no problem in using this with Buttons or JMenuEntries ... but how do I tell the window to run the method when the User clicks the "X" (window close button) ?
2) About RMI when closing the Server
Is it necessary to run "Naming.unbind..." when the Server is shutting down or is it ok, just to use System.ecit(0) and a shutdown hook at the datafile ?
Daniel Breitner wrote:Is it necessary to let the User choose a port to start the server on ?
That's actually a good question, because nothing is said about it in the requirements So it is certainly not a must requirement, so you are not required to do it. Although I think it's better (more user-friendly) to add the possibility to run on another port. Because what would happen if the port you use in your program (default rmi or an arbitrary chosen value) is already in use.