Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Jay, > I keep getting java.lang.NullPointerException for the following code: > > ScalarMap shape_map = new ScalarMap(x,Display.Shape); > VisADGeometryArray[] shapes; > shapes = new VisADGeometryArray[max_points]; > for(int i=0;i<max_points;i++) > { > shapes[i] = makeCube(); > } > ShapeControl shape_control = (ShapeControl) shape_map.getControl(); > shape_control.setShapeSet(new Integer1DSet(1)); // ERROR on this line > shape_control.setShapes(shapes); Add your shape_map to a display before calling the getControl() and the NullPointerException should be gone. Cheers, Mathias
visad
archives: