private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  ObjectInputStream.GetField f=s.readFields();
  hgap=f.get("hgap",0);
  vgap=f.get("vgap",0);
  if (f.defaulted("vector")) {
    Hashtable<String,Component> tab=(Hashtable)f.get("tab",null);
    vector=new Vector<>();
    if (tab != null && !tab.isEmpty()) {
      for (Enumeration<String> e=tab.keys(); e.hasMoreElements(); ) {
        String key=(String)e.nextElement();
        Component comp=(Component)tab.get(key);
        vector.add(new Card(key,comp));
        if (comp.isVisible()) {
          currentCard=vector.size() - 1;
        }
      }
    }
  }
 else {
    vector=(Vector)f.get("vector",null);
    currentCard=f.get("currentCard",0);
  }
}

private void readObject ( ObjectInputStream s ) throws ClassNotFoundException , IOException { ObjectInputStream . GetField f = s . readFields ( ) ; hgap = f . get ( "hgap" , 0 ) ; vgap = f . get ( "vgap" , 0 ) ; if ( f . defaulted ( "vector" ) ) { Hashtable < String , Component > tab = ( Hashtable ) f . get ( "tab" , null ) ; vector = new Vector < > ( ) ; if ( tab != null && ! tab . isEmpty ( ) ) { for ( Enumeration < String > e = tab . keys ( ) ; e . hasMoreElements ( ) ; ) { String key = ( String ) e . nextElement ( ) ; Component comp = ( Component ) tab . get ( key ) ; vector . add ( new Card ( key , comp ) ) ; if ( comp . isVisible ( ) ) { currentCard = vector . size ( ) - 1 ; } } } } else { vector = ( Vector ) f . get ( "vector" , null ) ; currentCard = f . get ( "currentCard" , 0 ) ; } }
reads serializable fields from stream .
