I have to reparent a X-Window (from a C++ app) on a Java frame (from a java app). This X-Window has to be inserted inside the Java component tree so that the z-Order would be respect. To do that, I need to understand:
- First, the exact relationship between the component tree created by a Java application and the matching X-Window tree.
- Second, whether and where I can insert a X-Window on the Java tree thanks to the reparent.
- Third, the way the window/component stack is handled: which window/component would be on top of another.
Several weeks of research... but I don't find any resource on these questions...
About the question 1. As far I understand, If i create a java main frame with components and two other frames the Swing tree should looks like this:
Frame0
:
:-------------------------------
: : :
Component Frame1 Frame2
:
Component-----------Component
About the X-Window tree: aach Frame is an Heavy-Weight component, so each Frame has a X-Window ID. So the X-Window tree could look like this:
Frame0
:
Frame1---------Frame2
About the question 2. My question is: what happens if I insert an Applet (so an Heavy-Weight component) in the middle of the Swing tree among other components? What the X-window would look like? I hope that by this way I can reparent a X-Window on a Java Application and that this X-Window would be inserted in the Java tree.
About the question 3. Even if I can reparent/insert the X-Window into the Java Application, I'm not sure that the z-order would be respected. In fact, I made a trial and the X-Window has appeared on top of all the component of the Java Frame. I'm not sure to understand the way the window/component stack is handled and its relationships with the java and the X-Window trees.