Skip to main content

JPanel / JFrame looks wrong

16 replies [Last post]
nourddin
Offline
Joined: 2007-08-02

Peace be upon all
I'm trying to put a jpanel into a 3d shape under the lg3d project, but the result always comes not like the interpretations I found on the web about this task.

The swing node (jpanel, or jframe) always appears outside the lg3d project's window in a seperate window, not inside the shape or the Frame3D.
What can I do, and what is the error.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nourddin
Offline
Joined: 2007-08-02

PBUY yasuhiro(thaniwa) ,

The problem cannot be resolved, and the code consists of 3 classes, they are:

SwingNodeTest
http://fisheye5.cenqua.com/browse/lg3d/lg3d-demo-apps/src/classes/org/jd...

TestPanel, and
ControlFrame

Thanks

thaniwa
Offline
Joined: 2004-06-12

Hi nourddin,

> I checked the class with my class and found no
> changes, although, I replaced it and found the same
> results,................"No changes, the panel still
> in a separate window".

If you cannot resolved problems,
please post your code which using SwingNode, code of making JPanel components,
and .lgcfg file.

I cannot understand your stuation, because if using SwingNode class, JPanel object
is treat as LG3D component.

thanks,

yasuhiro(thaniwa)

Kirk Turner

My theory is that under windows the lg3d awt toolkit isn't being
loaded correctly... but what I'm also seeing is that the build.xml
file is not in a working state in general.

Can you try downloading the build.xml from the 1.0 release from here:

https://lg3d-core.dev.java.net/source/browse/lg3d-core/build.xml?rev=1.1...

and replacing the one in lg3d-core with it, then trying to build and run?

Kirk

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

nourddin
Offline
Joined: 2007-08-02

PBUY (Peace Be Upon You) Kirk,
Thank u for your interest,

I replace the build file with the one you adviced, but the run process failed.
This is the console:

You saied that lg3d does not work correctly under Windows, are you advice me to work under another OS. If yes, what is it? And is this the only solution for my situation?

Thanks

Message was edited by: nourddin

Message was edited by: nourddin

thaniwa
Offline
Joined: 2004-06-12

Hi nourddin,

> You saied that lg3d does not work correctly under
> Windows, are you advice me to work under another OS.
> If yes, what is it? And is this the only solution for
> my situation?

I do not know about development on Windows.
My development enviroment are Fedora 6/7 and netbeans,
and SwingNode works fine.
Trumplayer(in LG3D1.0) and jsaddle(in lg3d-incubator only)
uses Swing and SwingNode, and works fine.

>The problem cannot be resolved, and the code consists of 3 classes, they are:
>SwingNodeTest
>TestPanel, and
>ControlFrame

Do you have a .lgcfg file?
LG3D app is the jar file which have classes for app and .lgcfg file,
and application jar file have to be in $lg3d/ext/app directory.

I could not find a good tutorial, wriiten in English, to develop apps for lg3d 1.0 ...

thanks,

yasuhiro(thaniwa)

Kirk Turner

Ok I was investigating and playing around the CVS HEAD version of lg3d
last night, and it has some major problems. As far as I can tell, the
changes for wonderland have been going into CVS HEAD instead of the
wonderland branch - and it has different design constraints.

So what does that mean? It is best to work with the rel_1-0-0. You'll
need to check out lg3d-core, lg3d-incubator and lg3d-demo-apps again,
but this time check out the rel_1-0-0 tag:

cvs -d:pserver:username@dev.java.net:/cvs checkout -r rel_1-0-0
lg3d-core lg3d-incubator lg3d-demo-apps

if you are doing it via the command line. You should see an option for
the tag when checking out via netbeans.

There is one thing that needs fixing if you are on linux - the X11
code has changed for more recent versions of java6. I don't have the
change in front of me, but it was related to the XKeysym which failed
because it was expecting two parameters instead of 1. By passing a 0
as the second parameter it'll be fixed.

Anyway after wonderland makes it release in the next few days I'll
sort out the issues and make lg3d HEAD all about lg3d again and remove
the wonderland references (they'll be moved into a branch).

Kirk

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

nourddin
Offline
Joined: 2007-08-02

Peace be upon u Kirk

I want to tell u that I found the same result when running the SwingTest tutorial in the lg3d-demo-apps, without any modifications

thaniwa
Offline
Joined: 2004-06-12

Hi nourddin ,

You can see the source code of swingnode test.
Please compare this code with your code.
You might be able to get a hint.

http://fisheye5.cenqua.com/browse/~raw,r=1.2/lg3d/lg3d-demo-apps/src/cla...

Thanks,

yasuhiro(thaniwa)

nourddin
Offline
Joined: 2007-08-02

Peace be Upon you yasuhiro(thaniwa) ,

thank u 4 ur interest

I checked the class with my class and found no changes, although, I replaced it and found the same results,................"No changes, the panel still in a separate window".

I have a quistion to ALL visirots:
Is the code of SwingNodeTest work correctly, meaning that the panel appears inside the projrct like second screenshot "Panorama 1 - Switch Desktops" in this link
http://www.sun.com/software/looking_glass/details.xml

If yes, from where u downloaded the source code.
If no, what u did?

Thanks

nourddin
Offline
Joined: 2007-08-02

I have a quistion to All and specially to the Java.net owners

Is the hardware requirments can affect on this problem

Thanks

nourddin
Offline
Joined: 2007-08-02

Peace Be Upon All

Thank you for all visitors and participators, specially for Kirk

the problem was that the awt works wrong under Windows

Just I switched to Linux the problem disappeared.

Thank u 4 all again

Mahmoud Nourddin

nourddin
Offline
Joined: 2007-08-02

Peace Be Upon All

Because of the problem is still wirhout no changes, I suggest that we do a chatting about it.
If any one interested in chatting, my email is: nourddin-m@hotmail.com

Kirk Turner

> The swing node (jpanel, or jframe) always appears outside the lg3d project's window in a seperate window, not inside the shape or the Frame3D.

Normally this means that it isn't loading the special lg3d awt toolkit.
Four questions to help us sort this out:
1. What operating system, java version and build of lg3d?
2. What mode of starting lg3d are you running (app or dev)?
3. What is the output displayed to the console when lg3d is run?
4. What is the contents of /var/tmp/lgserver.log - in particular the
third line LG_SETTINGS

Thanks,

Kirk

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

nourddin
Offline
Joined: 2007-08-02

Peace be upon you,
Thank you for interest

> 1. What operating system, java version and build of lg3d?
OS: Windows XP SP2
JDk: jdk1.6.0_02
Java3d: 1.5.1
lg3d: I downloaded it using Netbeants' CVS server since almost 1 month

> 2. What mode of starting lg3d are you running (app or dev)?
I'm using the default build and run commands in NetBeans 5.5.1

> 3. What is the output displayed to the console when lg3d is run?

Listening for transport dt_socket at address: 8889
26/11/2007 05:58:24 Ù… org.jdesktop.lg3d.displayserver.Main main
INFO:
LG3D Version : dev-1-0-1
LG3D Build Time : 15:12 EET 31 أكت 2007(0710311512)
LG3D Build Type : user
LG3D Java Version : 1.6.0_02

Java Version : 1.6.0_02-ea
Java Vendor : Sun Microsystems Inc.
Java Class Version : 50.0
Java Class Path : D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\build\current\debug\lib\lg3d-core.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\build\current\debug\lib\lg3d-awt-toolkit.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\app\bgmanager.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\src;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\commons-cli-1.0.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\escher-0.2.2.lg.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\j3d-contrib-utils.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\jxta.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\satin-v2.3.jar;D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core\ext\svgSalamander.jar
App Codebase : file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app

OS Name : Windows XP
OS Arch : x86
OS Version : 5.1

Def. Locale Language Code : ar
Def. Locale Country Code : EG

26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.LgConfig loadConfig
INFO: Finished loading config
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.LgConfig loadConfig
WARNING: NativeWin L&F
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DefaultPlatformConfig logConfig
CONFIG: FoundationWinSys org.jdesktop.lg3d.displayserver.fws.awt.WinSysAWT
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DefaultPlatformConfig logConfig
CONFIG: NativeWinIntegration
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DefaultPlatformConfig logConfig
CONFIG: NativeWinLookAndFeel
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DefaultPlatformConfig logConfig
CONFIG: ClientServer false
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl initialize
CONFIG: Display configuration overridden by lg.displayconfigurl property to file:/D:/mahmoud embabi/My Work/SunProjects/lg3d/lg3d-core/src/etc/lg3d/displayconfig/j3d1x1
26/11/2007 05:58:26 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl initialize
CONFIG: Using UniverseFactory org.jdesktop.lg3d.displayserver.DefaultUniverseFactory@650892
Java 3D: Shape3D bounds enabled for transparency sorting
26/11/2007 05:58:32 Ù… org.jdesktop.lg3d.displayserver.DefaultUniverseFactory createUniverse
INFO: com.sun.j3d.utils.universe.ConfigContainer@ec115b
26/11/2007 05:58:34 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl logRenderingInfo
INFO:
Java 3D version : 1.5.1 fcs (build6)
Java 3D vendor : Sun Microsystems, Inc.
Java 3D specification.version : 1.5
Java 3D specification.vendor : Sun Microsystems, Inc.
Java 3D renderer : OpenGL
Renderer version : 1.4.0 - Build 4.14.10.4436

doubleBufferAvailable : true
stereoAvailable : false
sceneAntialiasingAvailable : true
sceneAntialiasingNumPasses : 8
textureColorTableSize : 0
textureEnvCombineAvailable : true
textureCombineDot3Available : true
textureCombineSubtractAvailable : true
texture3DAvailable : true
textureCubeMapAvailable : true
textureSharpenAvailable : false
textureDetailAvailable : false
textureFilter4Available : false
textureAnisotropicFilterDegreeMax : 4.0
textureBoundaryWidthMax : 1
textureWidthMax : 2048
textureHeightMax : 2048
textureLodOffsetAvailable : false
textureLodRangeAvailable : true
textureUnitStateMax : 8
compressedGeometry : 1.0.2

26/11/2007 05:58:34 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl checkViewConfiguration
INFO: View Configuration:
PreferedWidth : 0.2784375, 0.2784375
PreferedHeight : 0.21224999999999997, 0.21225
LeftEye : (0.142, 0.135, 0.4572)
RightEye : (0.208, 0.135, 0.4572)
Field Of View 45.0

26/11/2007 05:58:34 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl initializeFoundationWinSys
INFO: Initialising Foundation WinSys org.jdesktop.lg3d.displayserver.fws.awt.WinSysAWT
26/11/2007 05:58:34 Ù… org.jdesktop.lg3d.displayserver.fws.PickEngine initialize
CONFIG: PickEngine initialized
26/11/2007 05:58:34 Ù… org.jdesktop.lg3d.wg.AnimationScheduler initialize
CONFIG: Animation System Started
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jpedalSTD.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../cid.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../bcprov-jdk14.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jai_core.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jai_codec.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/jaxrpc.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/axis.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/commons-logging-1.0.4.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/commons-discovery-0.2.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/wsdl4j-1.5.1.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../activation.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../mail.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jl1.0.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:35 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl initializeSceneManager
INFO: Initialising Scene Manager org.jdesktop.lg3d.scenemanager.glassy.GlassySceneManager
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jpedalSTD.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../cid.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../bcprov-jdk14.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jai_core.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jai_codec.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/jaxrpc.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/axis.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/commons-logging-1.0.4.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/commons-discovery-0.2.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../axis/wsdl4j-1.5.1.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../activation.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../mail.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ConfigData parseClassPathJars
WARNING: Unable to locate jar [../jl1.0.jar] directly or in [file:///D:\mahmoud embabi\My Work\SunProjects\lg3d\lg3d-core/ext/app].
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ApplicationDescription doConfig
WARNING: Executable xterm not found, ignoring taskbar item xterm
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.config.ApplicationDescription doConfig
WARNING: Executable firefox not found, ignoring taskbar item Firefox
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.utils.startmenu.StartMenuItemConfig doConfig
WARNING: Executable xterm not found, ignoring taskbar item xterm
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.utils.startmenu.StartMenuItemConfig doConfig
WARNING: Executable firefox not found, ignoring taskbar item Firefox
26/11/2007 05:58:39 Ù… org.jdesktop.lg3d.scenemanager.utils.startmenu.StartMenuItemConfig doConfig
WARNING: Executable firefox http://lg3d-core.dev.java.net not found, ignoring taskbar item Lg3d Homepage
26/11/2007 05:58:40 Ù… org.jdesktop.lg3d.utils.prefs.LgPreferencesHelper loadDefaultPreferences
INFO: Preferences have been initialized: /etc/lg3d/skel/prefs.xml
26/11/2007 05:58:40 Ù… org.jdesktop.lg3d.utils.prefs.LgPreferencesHelper initLg3dDefaultIfNeeded
INFO: LG3D Preferences have been initialized
26/11/2007 05:58:43 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl processAllConfig
INFO: Start-up configuration completed...
26/11/2007 05:58:43 Ù… org.jdesktop.lg3d.displayserver.socketconnector.ServerHandler
INFO: Starting DisplayServer...
26/11/2007 05:58:44 Ù… org.jdesktop.lg3d.sg.utils.image.TextureLoader chooseFormat
INFO: Unoptimized Image Type 13
26/11/2007 05:58:45 Ù… org.jdesktop.lg3d.sg.utils.image.TextureLoader chooseFormat
INFO: Unoptimized Image Type 13
26/11/2007 05:59:50 Ù… org.jdesktop.lg3d.displayserver.DisplayServerControl$2 componentResized
CONFIG: Canvas3D size changed to 1024x682
GlassyTaskBar sizeChange
0.2784375 0.21225
-0.093624994 -0.04
26/11/2007 06:00:06 Ù… org.jdesktop.lg3d.utils.action.AppLaunchAction performAction
WARNING: Executing java app in the same JVM: java org.jdesktop.lg3d.apps.swingtest.TestFrame
Using ClassLoader org.jdesktop.lg3d.displayserver.LgClassLoader@f65b5b ID = 56
Classpath =

> 4. What is the contents of /var/tmp/lgserver.log - in particular the
third line LG_SETTINGS
so sory, I don't understand the question

Very thanks again

thaniwa
Offline
Joined: 2004-06-12

Hi nourddin,

> The swing node (jpanel, or jframe) always appears
> outside the lg3d project's window in a seperate
> window, not inside the shape or the Frame3D.
> What can I do, and what is the error.

Did you try SwingNode?
If you did not use it in your source code, please try it.

http://javadesktop.org/lg3d/javadoc/rel-1-0-0/lg3d/docs/javadoc/api/org/...

thanks,

yasuhiro(thaniwa)

nourddin
Offline
Joined: 2007-08-02

Thank u for quick answersb, but I used SwingNode already and found the same result