A cool Java Swing component is a JOptionPane:
In your code, just before data is written to the file (or before the file is created), introduce a JOptionPane and create a variable to store the returned value eg:
int input = JOptionPane.showConfirmDialog(null, "Do you want to proceed?", "Confirmation Box",JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
Try to figure out what value is being returned if you click YES and what value is being returned when you click NO.
Use that knowledge to code the expected behaviour outlined by the requirement above.
Clearing fields
After data has successfully been written to the file, a method clearFields is called. This method clears the three text boxes so that the user can register another member without having to delete already-recorded data. It should also get the identity checkbox to unchecked, and empty the registration number label.
These forms of testing were described at the top of this page. Do you think you could give a definition to each one?!
alpha testing beta testing whitebox testing blackbox testing JOptionPane