AW: How can I change between displaying 2D or 3D objects

Hi Erik,

As far as I know there is no possibility to switch one DisplayImpl into
another. But you can construct a DisplayImplJ3D that behaves like a

DisplayImplJ3D display = new DisplayImplJ3D("display", new

Visad then constructs a Java3D display that behaves like a 2D-display.
So you have full hardware acceleration even in 2D.

Nevertheless if you want to switch between 2D and 3D you have to
construct 2 separate displays. You can add both of them to your gui and
set only one of them visible at a time.

Another way would be to remove the old display and add the new to your
gui. See for

Cheers, Mathias