I want to create a Swing application to display two 3D models in viewports similar to the kind you'd see in programs like 3D modellers..

I'm ok with my current understand of Swing and seperately with Java 3D (in creating applets) but i've never had any experience in bringing the two together and I've read around the net and it seems like its an area where people seem to have alot of problems..

The question i'd like to raise is what component do I use to display my Java3D model scene in an application frame? would I embedd a canvas3D object into a container like a panel or would that be impossible/too slow?

Or would I have to (or would it be easier to..) create a pop-up window or even a pop-up applet to display my Java3D scene?

And lastly is the use of Swing even reccomended in this or should I revert back to using awt for compatibility?

You can put a Canvas3D inside a JPanel, but you will want to organize your layout up-front to make sure the Canvas3D doesn't overlap with any other Swing component, because the Canvas3D (heavyweight) will eclipse the lightweight component. I have used a Canvas3D inside a TabPane with no problem, as long as I detach any live BranchGroups when switching tabs (however this causes a delay depending on the size of your BranchGroup).

You can also use two Canvas3Ds, perhaps side-by-side in different JPanels. Your performance will degrade, however, because you'll be splitting CPU between the two Canvas3D's.

If you want to draw any swing stuff above the Canvas3D you can use a Panel (yes a Panel not a JPanel) and add the swing stuff to the Panel. This way the heavyweight Panel draws above the canvas, but doesn't draw above the Swing

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org