Hi all!! I have got a JAVA3D application that I show it in a JFrame.
So, everything is correct.
--->This schem is correct:
class program3D extends JFrame{
public program3D(){ }
public BranchGroup createSceneGraph(){ }
public static void main ( String arg[] )
{
new program3D();
}
}
_______________________________________________________________________
The problem is when I want to draw the scene inside of JPanel, and
then, this JPanel put inside of JFrame.
--->THE PROBLEM:The scene is not seen !!!
class program3D extends JPanel{
public program3D(){ }
public BranchGroup createSceneGraph(){ }
public static void main ( String arg[] )
{
JFrame window=new JFrame("Main");
window.setLayout( new BorderLayout() );
window.getContentPane().add( new program3D(),
BorderLayout.CENTER); //PROBLEM
window.setSize(500,500);
window.setVisible(true);
}
}
Regards!