Bonjour,
J'ai une classe cens�e afficher un cube en 3D dont voici le code :

Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class Main {
 
	public static void main(String[] args){
 
		Fenetre f = new Fenetre();
		Canvas3D canvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
		f.add(canvas3D) ;
		BranchGroup scene = createSceneGraph();
		scene.compile();
		SimpleUniverse si = new SimpleUniverse(canvas3D);
		si.getViewingPlatform().setNominalViewingTransform();
		si.addBranchGraph(scene);
		f.repaint();
	}
 
	public static BranchGroup createSceneGraph()
	{
	    BranchGroup objRoot=new BranchGroup();
	    Transform3D rotat = new Transform3D();
	    rotat.rotX(Math.toRadians(60));
	    TransformGroup tg = new TransformGroup(rotat);
	    ColorCube cc = new ColorCube(0.5);
	    tg.addChild(cc);
	    objRoot.addChild(tg);
	    return objRoot;
 
	}
}
mais � l'ex�cution du code, rien ne s'affiche dans ma fen�tre.
Pendant je redimensionne celle-ci, mon cube s'affiche en clignotant puis il ne s'affiche plus(ou alors il s'affiche dans la fenetre, mais des que je redimensionne, il part).
Voila, j'esp�re avoir �t� clair, mais si ce n'est pas le cas, aider moi quand m�me s'il vous pla�t !