A button needs to be added that will generate a user registration number for a new member.
When the button is clicked, an algorithm produces a random registration number.
When the submit button is clicked, this data will be written at the start of the user information string.
But we are already using our Action Listener on the submit button!
Is it possible to add multiple action listeners to components on the same panel...
Design your own way to generate a random registration number for a new member. For example, it could be the first letter of their forename followed by the first letter of their surname followed by 4 random number 1-9.
When you have a registration number, see if you can update the submit button action.
If no registration number is available, a warning message is displayed (like we did before).
If all data has been entered, then the registration number is the first item added to the string before writing to the text file.
iterative cycle client survey observe stakeholder