www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Texugo on June 20, 2011, 06:09:38 am

Title: Swing as Gui Layer
Post by: Texugo on June 20, 2011, 06:09:38 am
Hello buddies

I tried to put swing as a gui layer in my application but the components don't show. How to make it? I've searched in forum/wiki but i'm still confused. My code is exactly the same from Loading models from Blender http://www.jpct.net/wiki/index.php/Loading_3ds_Models_from_Blender (http://www.jpct.net/wiki/index.php/Loading_3ds_Models_from_Blender). the only difference is a method who's add swing components to frame.
There's a simple way to do this?

Thanx
Title: Re: Swing as Gui Layer
Post by: EgonOlsen on June 20, 2011, 05:40:58 pm
Using which renderer?
Title: Re: Swing as Gui Layer
Post by: Texugo on June 20, 2011, 06:00:45 pm
It don't work in any render? I'm using software renderer, but i have plans in use opengl render in near future.
Thanx
Title: Re: Swing as Gui Layer
Post by: EgonOlsen on June 20, 2011, 11:13:39 pm
I hate swing with a passion, so i'm not the guy to solve this...maybe raft can help out here?
Title: Re: Swing as Gui Layer
Post by: raft on June 20, 2011, 11:47:56 pm
you cannot use swing with opengl renderer. you can use AWTGLRenderer with AWT but not with Swing. that is because heavy weight (AWT) and light weight (Swing) components do not mix well.

what is the problem exactly? do you get any exceptions?

all sample applications of Bones use software renderer + Swing. maybe it helps as a starting point:
http://www.aptalkarga.com/bones/
Title: Re: Swing as Gui Layer
Post by: Texugo on June 21, 2011, 04:27:24 am
My problem is just a standart one ... just but some Buttons and Checkboxes. I didn't have downloaded Bones. I'll download it and study the samples.
Thanx 4 replies