I am attempting to get my program to save the data inputted by a user. Currently, I am getting a:
java.io.NotSerializableException: java.awt.image.BufferedImage error
Now, what I have done is implement the FileWriter in my user interface class, and by examining the text file it appears it is trying to save all of the information about the text boxes and labels that I have implemented on my UI. In my main class that my UI is based off of, there is an ArrayList which holds the objects of my project. I need to serialize these objects but they contain a BufferedImage. I think I have found a way to work around the BufferedImage error, but I do not want the entire UI to be serialized.
So my question is, should I move the serialization method into the class that contains my ArrayList of objects, so that the UI will not be serialized?