Re: Applying shapes in animation

> I keep getting java.lang.NullPointerException for the following code:

At which line???

But its clear that shape_control is null. You need to pas a
ScalarMap to display.addMap() before you call its getControl().

>  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);

Bill