Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » swing2swt library(Swing-to-SWT library PROS and CONS, and need more info.)
swing2swt library [message #753563] Thu, 27 October 2011 13:47 Go to next message
Ronald So is currently offline Ronald So
Messages: 198
Registered: April 2011
Senior Member
Hi,

I am currently assessing the work that takes to convert an existing SWING application into Eclipse RCP. I came across an old, but useful, library that was written by Yannick Saillet from IBM lab.

http://www.ibm.com/developerworks/java/tutorials/j-swing2swt/downloads.html

Did anyone successfully convert an enterprise SWING application into SWT by using this library? Also, there are a few layout manager such as the GridBagLayout that are not included in the wrapper. Does anyone have any information on that?

Thanks a lot.

Ronald
Re: swing2swt library [message #754427 is a reply to message #753563] Wed, 02 November 2011 10:12 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
Hi Ronald,

I don't have experience with the library that you mentioned, and since
no one else has responded it seems that others don't either.

To write an RCP app I don't think you can get away with writing no swt
code, simply because that is the widget currency that the platform uses.
However SWT is able to embed AWT/Swing components within its
Composites, for some basic examples see
http://www.eclipse.org/swt/snippets#awt .

If you decide to try embedding AWT/Swing in SWT then you should look at
the Albireo project ( http://wiki.eclipse.org/Albireo_Project ), which
provides a layer that helps with this (I believe that it works around
some interop bugs, helps with aspects like managing focus, etc.).

HTH,
Grant


On 10/27/2011 1:47 PM, Ronald So wrote:
> Hi,
>
> I am currently assessing the work that takes to convert an existing
> SWING application into Eclipse RCP. I came across an old, but useful,
> library that was written by Yannick Saillet from IBM lab.
>
> http://www.ibm.com/developerworks/java/tutorials/j-swing2swt/downloads.html
>
> Did anyone successfully convert an enterprise SWING application into SWT
> by using this library? Also, there are a few layout manager such as the
> GridBagLayout that are not included in the wrapper. Does anyone have any
> information on that?
>
> Thanks a lot.
>
> Ronald
>
Re: swing2swt library [message #754463 is a reply to message #754427] Wed, 02 November 2011 11:46 Go to previous message
Ronald So is currently offline Ronald So
Messages: 198
Registered: April 2011
Senior Member
Thanks for your reply, Grant. I am aware of the SWT_AWT bridge but the additional work that takes to make everything works the way we like drive us away from that choice. I am also aware of the Albireo project but it has no indication that it is available now nor it will be available any time soon.

I agree with you that it is our best interest to make our guys to learn SWT anyway instead of messing around with the wrapper. It should not take long for a good UI developer to learn SWT if he/she has SWING or any UI framework background.

For tracking purpose, I went around the GridBagLayout problem by converting that into SWT layouts or one of the two layout managers that the wrapper provides. It is not ideal, but it works (just with more hassles).

[Updated on: Wed, 02 November 2011 11:46]

Report message to a moderator

Previous Topic:Given a Bundle, how can I find what extensions it provides?
Next Topic:Size of a view part
Goto Forum:
  


Current Time: Thu Aug 28 03:29:06 EDT 2014

Powered by FUDForum. Page generated in 0.02152 seconds