Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Albireo » SWT_AWT cannot subclass Composite
SWT_AWT cannot subclass Composite [message #8777] Fri, 31 October 2008 08:04 Go to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi,

I am making use of SWT_AWT bridge for bring my Swing application into
Eclipse/SWT (I cannot move higher from Eclipse/SWT 3.2 and hence I am using
SWT_AWT and not Albireo). While doing so, I referred to the article
http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html
by Gordon Hirsch and recently made use of his Example code given there. As
per this, all the necessary workarounds to make SWT_AWT work for you are
applied to a subclass object of Composite (EmbeddedSwingComposite in his
code). As per his recommendation I subclassed this and then used it in my
code. However, I am encountering NPE on the EventThread and while trying to
find solutions for the same I came across this:
http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg046 14.html which
suggests NOT to subclass Composite.

Is this a known issue with SWT_AWT and is there any workaround for the same?

Any help/direction would be really useful!

Thanks,
Rahul
Re: SWT_AWT cannot subclass Composite [message #8790 is a reply to message #8777] Fri, 31 October 2008 14:04 Go to previous message
Gordon Hirsch is currently offline Gordon HirschFriend
Messages: 100
Registered: July 2009
Senior Member
If you are using EmbeddedSwingComposite from the example code, the AWT
frame is embedded directly into the SWT.EMBEDDED composite, so the email
you refer to should not apply.

Byeond that, a stack trace might help shed light on the problem.

Rahul Kamdar wrote:
> Hi,
>
> I am making use of SWT_AWT bridge for bring my Swing application into
> Eclipse/SWT (I cannot move higher from Eclipse/SWT 3.2 and hence I am using
> SWT_AWT and not Albireo). While doing so, I referred to the article
> http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html
> by Gordon Hirsch and recently made use of his Example code given there. As
> per this, all the necessary workarounds to make SWT_AWT work for you are
> applied to a subclass object of Composite (EmbeddedSwingComposite in his
> code). As per his recommendation I subclassed this and then used it in my
> code. However, I am encountering NPE on the EventThread and while trying to
> find solutions for the same I came across this:
> http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg046 14.html which
> suggests NOT to subclass Composite.
>
> Is this a known issue with SWT_AWT and is there any workaround for the same?
>
> Any help/direction would be really useful!
>
> Thanks,
> Rahul
>
>
Re: SWT_AWT cannot subclass Composite [message #574743 is a reply to message #8777] Fri, 31 October 2008 14:04 Go to previous message
Gordon Hirsch is currently offline Gordon HirschFriend
Messages: 100
Registered: July 2009
Senior Member
If you are using EmbeddedSwingComposite from the example code, the AWT
frame is embedded directly into the SWT.EMBEDDED composite, so the email
you refer to should not apply.

Byeond that, a stack trace might help shed light on the problem.

Rahul Kamdar wrote:
> Hi,
>
> I am making use of SWT_AWT bridge for bring my Swing application into
> Eclipse/SWT (I cannot move higher from Eclipse/SWT 3.2 and hence I am using
> SWT_AWT and not Albireo). While doing so, I referred to the article
> http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html
> by Gordon Hirsch and recently made use of his Example code given there. As
> per this, all the necessary workarounds to make SWT_AWT work for you are
> applied to a subclass object of Composite (EmbeddedSwingComposite in his
> code). As per his recommendation I subclassed this and then used it in my
> code. However, I am encountering NPE on the EventThread and while trying to
> find solutions for the same I came across this:
> http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg046 14.html which
> suggests NOT to subclass Composite.
>
> Is this a known issue with SWT_AWT and is there any workaround for the same?
>
> Any help/direction would be really useful!
>
> Thanks,
> Rahul
>
>
Previous Topic:SWT_AWT cannot subclass Composite
Next Topic:New milestone available
Goto Forum:
  


Current Time: Thu Nov 27 14:57:34 GMT 2014

Powered by FUDForum. Page generated in 0.09289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software