I'm starting with Swing programming, so I hope that I am not wasting bandwidth on something trivial. However, I'm really stuck.
I'm creating a Swing application involving students. I've created a JFrame and populated it with JComboBoxes, JCheckBoxes, JRadioButtons and the appropriate event handlers. I read a list of students from a file and populate a JComboBox. When the application is run, the results are written to a file. This all works fine. The "Submit" button causes the data to be written to the file.
I have two questions. First, the handler for the "Submit" button merely writes the data to the file. However, it does not change the values of the various Swing components back to their default values. I'd like to uncheck the JCheckBoxes, etc. Can anyone tell me how to do so?
The second question is related. I'm going to want a second version of this program for editing student information. In other words, I'd like to select the student from a JComboBox and read the information from a file. Then, I'd like to use a from with JCheckBoxes, JComboBoxes, etc to edit that student's record and write it to a file.
Many thanks for any assistance you can render. I'm trying to do this quickly and am floundering.