I need some help with Serializable, I can't seem to get it to work properly! I want to save my HashMap and be able to load it, but so far without success. By the looks of the code it seems correct, maybe the problem could be related to the HashMap which I want to save/load? I have implemented and imported Serializable for the class.
I access these methods from an ActionListener method, I have bound them to a button in a menu.
Looks OK to me. You haven't told us what the actual problem is. What do you expect to have happen, and what happens instead? If there's an exception stack trace, please copy and paste it into your reply.
I got a HashMap where I put my keys and values in, but whenever I save and try to load it next time I start the program the "information" in the HashMap seems to be gone. I do get the print confirmation I had in the code (which says I have saved or loaded the file), no errors, which makes me think I am doing something wrong with my HashMap.
I am using Swing where I have buttons assigned for the save and load methods, and another button with which I am adding keys and values into HashMap. I have the keys from the HashMap in a JComboBox, which I would like to be able to save and load if I wanted to.
author and iconoclast