RE: null scalary type in ScalarMap

>If you know of a better way to do this, let me know.

Try this:

   Vector myMaps = new Vector();
   for (int i = 0; i < fields; i++) {
      int assignment = theJgapAPI.getMappingForCell(cell_number, i);
      DisplayRealType mapTo = mappings[assignment];
      RealType mapFrom = (RealType) myVector.get(i);                        
      if (mapTo != null && mapFrom != null) {
         myMaps.add(new ScalarMap(mapFrom, mapTo));
      }
   }
   ScalarMap[] theMaps = new ScalarMap[myMaps.size()];
   myMaps.copyInto(theMaps);
   mySS.DisplayCells[width][height].setMaps(theMaps);              

This type of problem is exactly what java.util.Vector is designed to solve.

-Curtis