code :
Serializing
File file = jFileChooser1.getSelectedFile();
FileOutputStream f = new FileOutputStream(file);
ObjectOutputStream o = new ObjectOutputStream(f);
o.writeObject(myChartPanel);
o.close();
deserializing
File file = jFileChooser1.getSelectedFile();
FileInputStream f = new FileInputStream(file);
ObjectInputStream o new ObjectInputStream(f);
ChartPanel tata = (ChartPanel) o.readObject();
o.close();
and here is the error i get:
java.lang.NullPointerException at cc.ods.util.SerializeOpen.main
plz help me and send me any ideas you got

thanks in advance