AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scene inside of JFrame

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Apr 19, 2007 8:30 pm    Post subject: Scene inside of JFrame Reply with quote



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!
Back to top
Inácio Ferrarini
Guest





PostPosted: Fri Apr 20, 2007 3:29 pm    Post subject: Re: Scene inside of JFrame Reply with quote



Hi there.

I´ve 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ácio Ferrarini.

On Apr 19, 12:30 pm, Misterysw...@hotmail.com wrote:
Quote:
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!
Back to top
Guest






PostPosted: Sat Apr 21, 2007 8:56 pm    Post subject: Re: Scene inside of JFrame Reply with quote



Hi.
I want to add a JPanel inside of a JFrame, but in this case: the scene
is not seen.This is the problem.

See you soon
Back to top
Alexander Gran
Guest





PostPosted: Sun Apr 22, 2007 3:28 am    Post subject: Re: Scene inside of JFrame Reply with quote

Misterysword (AT) hotmail (DOT) com schrieb:

Quote:
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 (AT) gmx (DOT) net, please.
PGP-Key at http://www.grans.eu/misc/pgpkey.asc | Key-ID: 0x6D7DD291
Back to top
Guest






PostPosted: Tue Apr 24, 2007 4:05 pm    Post subject: Re: Scene inside of JFrame Reply with quote

Do you show me an example code??? For this: scene inside a JPanel, and
JPanel inside a JFrame.

Thanks!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.