Sagewire Logo

Scene inside of JFrame

5 Message(s) by 3 Author(s) originally posted in 3d java


From: Misterysword Date:   Thursday, April 19, 2007
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 isn't 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!


From: =?iso-8859-1?q?In=E1cio_Ferrarini?= Date:   Friday, April 20, 2007
Hi there.

I=B4ve never added a JFrame inside another.
Try changing program3d to a JPanel or a Canvas and then try to add it
to a JFrame.

See you,
- In=E1cio Ferrarini.

wrote in message:
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 isn't seen !!!
class program3D extends JPanel{
public program3D(){ }
public BranchGroup createSceneGraph(){ }
public static void main ( String arg[] )
{
JFrame window=3Dnew JFrame("Main");
window.setLayout( new BorderLayout() );
window.getContentPane().add( new program3D(),
BorderLayout.CENTER); //PROBLEM
window.setSize(500,500);
window.setVisible(true);
}
}


> Regards!


From: Misterysword Date:   Saturday, April 21, 2007
Hi.
I want to add a JPanel inside of a JFrame, but in this case: the scene
isn't seen.This is the problem.

See you soon


From: Alexander Gran Date:   Saturday, April 21, 2007
Misterysword@xxxxxxxxxxx schrieb:

Hi all!! I have got a JAVA3D application that I show it in a JFrame.
So, everything is correct.
The problem is when I want to draw the scene inside of JPanel, and
then, this JPanel put inside of JFrame.



I have a JAVA3d scene in a canvas, in a JPanel, in a JinteralFrame in a
JDesktopPane in a JFrame, and it works. So I suspect the bug somewhere in
your scene setup code.

regards
Alex

--
Some operating systems are called `user friendly',
Linux however is `expert friendly'.
Encrypted Mails welcome. Send spam to toZodiac@xxxxxxxxxxx, please.
PGP-Key at http://www.grans.eu/misc/pgpkey.asc | Key-ID: 0x6D7DD291


From: Misterysword Date:   Tuesday, April 24, 2007
Do you show me an example code??? For this: scene inside a JPanel, and
JPanel inside a JFrame.

Thanks!!



Next Message: to erase points cloud and to draw it.



Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional