Subject: Re: Imbedding java apps in tk?? - DN [1]
Jacob Levy <jyl@best.com> - 17 Jan 1999 - comp.lang.tcl,comp.lang.java
mo Have a look in the peer packages, there's classes called MEmbeddedFrame and WEmbeddedFrame. You'll note the constructor takes a 32 bit integer. On Unix this is an X11 WINDOW, on Win32 this is a HWIN. That should be enough to get the Java app to appear inside a Tk frame. Good luck, --JYL mo wrote: > "M.Ranganathan" wrote: > > > > mo wrote: > > > > > "M.Ranganathan" wrote: > > > > > > > > Hello! > > > > > > > > I am toying with the idea of imbedding java apps in a tk canvas. (The > > > > idea being thattcl/tk is the integration framework and the components > > > > are java.) Does anybody know if this can be done ? (and has anbody done > > > > it?) > > > > > > > > Thanks. > > > > > > > > Ranga. > > > > > > Combining Tk widgets and Java widgets is not really supported by > > > TclBlend. > > > One workaround I have used is to create a Java window over an existing > > > Tk > > > window without a border. This worked for the application I was writing > > > because the Java window was only needed for a short time (I used a > > > java Frame object to play an MPEG video clip over an existing Tk window > > > using the Java Media Framework and my own Tcl-JMF package). > > > > > > I hope that helps > > > mo dejong > > > dejong at cs.umn.edu > > > > I dont really want to combine java and tcl widgets. The question I have is > > really more of a java question than a tcl question. I was wondering if I can > > supply a top level window (other than the root window) to a java gui > > application and have it use that window as its top level window. In that > > case, one may effectively imbed java applications in a tcl canvas (just as > > one can do with tk applications today - you can supply wish a top-level > > window id. ). > > > > Ranga. > > This question seem to come up a lot. Lots of people seem to want to > do it and they keep asking "is it possible to ...". Sure anything is > possible. I think it would really help if someone went out and did it. > You can write code in Java that will find the native X window id and > then you could pass that to Tk. Of course, that will not work on Windows > boxes and it will tie the code to a JVM impl but life is like that. > Are you interested in trying that out and telling us how it went? > I would be willing to help all I could but I have no pressing need for > this feature so I am not going to code it. > > later > mo dejong > dejong at cs.umn.edu
Last modified
1999-09-27
1999-09-27
(195.108.246.50)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
