public static DefaultListModel createObjectsModel(DefaultListModel hashtablesModel,Class fbObjectClass) throws IllegalAccessException, InstantiationException {
  DefaultListModel model=new DefaultListModel();
  for (int i=0; i < hashtablesModel.getSize(); i++) {
    Hashtable table=(Hashtable)hashtablesModel.getItemAt(i);
    FBObject obj=(FBObject)fbObjectClass.newInstance();
    obj.copy(table);
    model.addItem(obj);
  }
  return model;
}

public static DefaultListModel createObjectsModel ( DefaultListModel hashtablesModel , Class fbObjectClass ) throws IllegalAccessException , InstantiationException { DefaultListModel model = new DefaultListModel ( ) ; for ( int i = 0 ; i < hashtablesModel . getSize ( ) ; i ++ ) { Hashtable table = ( Hashtable ) hashtablesModel . getItemAt ( i ) ; FBObject obj = ( FBObject ) fbObjectClass . newInstance ( ) ; obj . copy ( table ) ; model . addItem ( obj ) ; } return model ; }
this is a utility method that transforms a defaultlistmodel that contains hashtable entries into a defaultlistmodel that will contain fbobject objects that will be initialized with the hashtable entries
