In this assignment you will create a simple “Pet Application” to view pet data stored in a database.
The form has textfields to hold the data from the Pet object, labels to describe each of the textfields, three buttons, three additional labels, one additional textfield and one menu item.
Functionality for the different buttons, the additional labels, the additional textfield and the menu item is as described below:
Labels: In addition to the labels for describing the textfields, there are three additional labels in this form.
Label 1: This label is the one at the top of the form and will display the title “Pet Data Application.
Label 2: This label will be placed at the bottom center of the form and will display messages to the user as described later.
Label 3: This label will be placed at the bottom right corner, before the Find button and identifies the textfield where the user will enter a Pet id to search for a specific Pet.
TextField: This extra textfield will be placed just before the Find button. When a user wishes to search for a specific Pet, the user will enter the PetID in this textfield.
Buttons: There are three buttons for which functionality is to be implemented.
Next: When this button is clicked, data about the next pet in the file should be displayed in the form. If the record is already showing the last pet in the file, a message saying “Already at last record” should be displayed in a label at the center of the form (Label 2).
Previous: When this button is clicked, data about the previous employee in the file should be displayed in the form. If the record is already showing the first employee in the file, a message saying “Already at first record” should be displayed in a label at the center of the form (Label 2).
Find: When this button is clicked:
Exit: This menuItem should part of the File menu. When this menu item is selected, data should be written back to the binary file as a set of Pet objects.
Included is an executable file of the application. You can execute this application and see exactly what is required. Grading will be based on your application performing like the one I have uploaded. See the sample .jar program and .dat file provided.