NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
>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
visad
archives: