Skip to main content

how to plugin my application into lg3D

10 replies [Last post]
deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

Hi all
I created a window and i want to plugin this window into lg3D. I want to know what are the ways to go about this and which one would u suggest is best among them
Can anyone help me with this at the earliest as I need to proceed further with my code and learning..
regards
deepthi

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

Hi William
thanks once again
regards
deepthi

afishionado
Offline
Joined: 2004-05-26
Points: 0

I assume that you mean a Swing window.

The easy way would be to run lg3d-app and launch your program from inside Looking Glass. (This would work on Linux or Solaris.)

The better way would be to bundle your program as a LG3D applications, following the instructions for building and installing a jar in the tutorial (which I apparently need to update!).

William

deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

I'm working on Windows XP system. I shall try bundling as u said and see how it works. What if the window is not a Swing window?
Thank u :)

afishionado
Offline
Joined: 2004-05-26
Points: 0

I think that AWT support is being worked on, but I don't know how far along that is.

If the window is something else like SWT, then the X11 integration under Solaris/Linux is the only thing that would work.

Swing is the only thing that I know will work on Windows other than actual LG3D components.

William

Krishna Gadepalli

There is already some support for running Swing applications inside
Looking Glass. It has some issues (focus problems, drop down lists dont
work etc) but is still quite usable.
If you want to run an arbitrary swing app inside LG take a look at
lg3d-demo-apps/src/config/swingtest.lgcfg and create something similar
for your app.
If you want to write an LG app that uses swing take a look at
lg3d-demo-apps/src/classes/org/jdesktop/lg3d/apps/swingtest

Meanwhile we are in the process of rewriting the LG-AWT part to better
support Swing (and even old AWT) apps inside LG. I will post more
information once I have an initial working version based on the new code.

-krishna

lg3d@javadesktop.org said the following on 09/21/2006 02:39 PM:
> I think that AWT support is being worked on, but I don't know how far along that is.
>
> If the window is something else like SWT, then the X11 integration under Solaris/Linux is the only thing that would work.
>
> Swing is the only thing that I know will work on Windows other than actual LG3D components.
>
> William
> [Message sent by forum member 'afishionado' (afishionado)]
>
> http://forums.java.net/jive/thread.jspa?messageID=155623
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
> For additional commands, e-mail: interest-help@lg3d.dev.java.net
>
>

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

deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

Hi Krishna
Thanks for the information but I'm unable to open the url: lg3d-demo-apps/src/config/swingtest.lgcfg could u please mail me the config file at the earliest
regards
deepthi

Krishna Gadepalli

Hi Deepthi
The path I sent you was to the source code (I assumed that you were
building Looking Glass since you were plugging apps into it)
Are you trying to add your application to a pre-built Looking Glass
environment ? If so I dont think that there is a simple/easy way to do it.

Your best bet would be to download the source code and build it with
your custom lgcfg file
Take a look at the "Resources" section in https://lg3d.dev.java.net/ for
more info.
Tutorial-1 (https://lg3d.dev.java.net/tutorial/tutorial1.html) also
tells you how to build your own LG3D app and setup a lgcfg config file.

Hope that helps
-krishna

lg3d@javadesktop.org said the following on 09/21/2006 04:14 PM:
> Hi Krishna
> Thanks for the information but I'm unable to open the url: lg3d-demo-apps/src/config/swingtest.lgcfg could u please mail me the config file at the earliest
> regards
> deepthi
> [Message sent by forum member 'deepthi_ventrapragada' (deepthi_ventrapragada)]
>
> http://forums.java.net/jive/thread.jspa?messageID=155652
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
> For additional commands, e-mail: interest-help@lg3d.dev.java.net
>
>

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

deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

hi krishna
I added an application following the steps in tutorial1.
Please find a piece of code below and could u tell me if i need to add/change it as I'm unable to type text in JTextArea of component displayed in lg3D.

JPanel jp = new JPanel(new BorderLayout());
SwingNode sn = new SwingNode();

jp.add(new JTextArea(),BorderLayout.CENTER);
sn.setPanel(jp);

regards
deepthi

afishionado
Offline
Joined: 2004-05-26
Points: 0

I don't see any problems (someone else will correct me if I'm wrong).

First off, can you type text into other LG3D applications? (Say, fire up the Googler program and try to type in a search.) There is (or at least was) a bug in Looking Glass itself that meant that some people couldn't type text into 3D programs.

William

deepthi_ventrap...
Offline
Joined: 2006-08-29
Points: 0

Hi William
I forgot to set the setEditable property of JTextArea to true. Its working fine now.
Thanks
Deepthi