@SuppressWarnings("unchecked") public void restore(String fileName) throws IOException, ClassNotFoundException {
  ObjectInputStream ois=new ObjectInputStream(new FileInputStream(fileName));
  locations=(Map<V,Point>)ois.readObject();
  ois.close();
  initializeLocations();
  locked=true;
  fireStateChanged();
}

@ SuppressWarnings ( "unchecked" ) public void restore ( String fileName ) throws IOException , ClassNotFoundException { ObjectInputStream ois = new ObjectInputStream ( new FileInputStream ( fileName ) ) ; locations = ( Map < V , Point > ) ois . readObject ( ) ; ois . close ( ) ; initializeLocations ( ) ; locked = true ; fireStateChanged ( ) ; }
restore the graph vertex locations from a file
