Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Swing-Swt bridge
Swing-Swt bridge [message #463156] Fri, 28 October 2005 07:43 Go to next message
Eclipse UserFriend
Originally posted by: chathurik.yahoo.com

Hi all,
How to convert swing application to SWT application
Thanx
Re: Swing-Swt bridge [message #463184 is a reply to message #463156] Fri, 28 October 2005 16:34 Go to previous message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
There are a couple methods, none of them terribly easy. The simplest is to use SwingWT (swingwt.sf.net) and change all your imports from java.awt and javax.swing to swingwt.awt and swingwtx.swing respectively. Unless you're doing some pretty escoteric stuff, you'll probably be fine with this method. SwingWT provides about 99% of Swing's functionality by peering to the SWT toolkit. So, you write using a free implementation of the Swing toolkit, but you get the performance and LAF of SWT.

The next best method is to rewrite your application's gui using SWT. No real easy way to do this, but it is simpler if you have a generic controller between your UI and your business logic layers. I've done this a few times, and honestly I prefer this to SwingWT. With SwingWT, as good as it is, you still run the risk of something not compiling, or even not working after it compiles. As I said, these instances are about 1% of the time. But in a non-trivial app with some non-standard stuff, you'll run into it.

There's always SWT_AWT, but I don't think that's what you're looking for. All SWT_AWT will do is allow you to use your Swing components in an SWT application. Hardly perfect.
Previous Topic:How to wrap on a Table column
Next Topic:Halting SWT thread but repainting
Goto Forum:
  


Current Time: Mon Sep 23 02:37:39 GMT 2024

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

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

Back to the top