Canvas3D incompatible with CardLayout?

I am having some trouble with the canvas. I put the canvas inside a JPanel with a cardlayout, and select another card to be in front. Then I add the JPanel to a visible component.

The trouble is: the Canvas3D now shows in front, no matter which card I ask to see. This happens only for 20 seconds or less depending on the speed of the computer, after that it works fine.

Can anybody offer some help to this problem?

Regards
Nikolai :-/

Found a workaround at j3d.org.