Re: Simple question: Can I embed Gecko using Java APIs (non JNI) in a Swing application without the AWT Heavyweight/Swing Lightweight component issues? Is so how?

sandipchitale <[email protected]> Mon, 20 Aug 2007 05:56:06 -0000
Newsgroups gmane.comp.mozilla.devel.java
Organization http://groups.google.com
Message-ID <1187589366.752027.23730__30038.9843214818$1187589618$gmane$org@i13g2000prf.googlegroups.com>
On Aug 15, 10:08 pm, Michal Ceresna <[email protected]> wrote:
> On Friday 17 August 2007, sandipchitale wrote:
>
> Hello Sandi,
>
> > Can I embed Gecko (XULRunner) using Java APIs (non JNI) in a Swing
> > application without the AWT Heavyweight/Swing Lightweight component
> > issues?
>
> Did not understand your question.
> What do mean by that issues exactly?

Sorry I presumed familiarity with the issue. I guess this is not a
Java NG.

The following article describes what it means by heavyweight (AWT) vs
lightweight(Swing) GUI components and the issue related to that:

http://java.sun.com/products/jfc/tsc/articles/mixing/

In a nutshell, a heavyweight (AWT) component has a native window
component as a peer vs lightweight (Swing) components are simply
painted on the graphics of the nearest heavyweight component. It is
not recommended to mix heavyweight and lightweight components. Based
on my reading it seems the that the embedding is achieved using a
native window handle which will translate to a heavyweight (AWT)
component in Java speak and thus cannot be used easily in Swing based
applications such as NetBeans. What I really wanted to find out was if
there is any other way than native window handle to embed Gecko. The
possibilities a:

- Some interface
- Window handle with a specified sub area as the clipping rectangle

--
Sandip
>
> best regards,
> Michal