Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT over Swing
SWT over Swing [message #452383] Fri, 18 March 2005 20:18 Go to next message
robert is currently offline robertFriend
Messages: 1
Registered: July 2009
Junior Member
Hi, I have just recently heard of SWT, and i would like to know -
essentially - why I should use it above the java Swing framework?
Re: SWT over Swing [message #452385 is a reply to message #452383] Fri, 18 March 2005 21:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: doug-list.threepenny.net

The primary difference is that SWT (like AWT before it) uses the native
operating system controls so an application written in SWT looks and
functions exactly like a native application.

Swing on the other hand uses no native controls, building everything up
itself from basic keystroke and drawing operations. As a result, a
Swing application always looks and functions a little differently than a
native application. (E.g. the file dialog in a Swing application
running on Windows looks nothing like the standard Windows file dialog
while the SWT one looks identical because it is identical).

In theory Swing should be better if you want cross platform support
because there's less reliance on the quirks of the OS. A Swing button
will always look the same. But SWT is generally better if you want a
"professional" look to your application.

People also debate the relative performance benefits of one over the
other, but I don't pay much attention to that. In each case, with
appropriate skill your UI should be fast enough to be responsive. If an
app is spending more time in the UI than doing actual work it's probably
not because of the toolkit.

Doug


robert wrote:

> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>
Re: SWT over Swing [message #452386 is a reply to message #452383] Fri, 18 March 2005 22:27 Go to previous messageGo to next message
Charlie Surface is currently offline Charlie SurfaceFriend
Messages: 40
Registered: July 2009
Member
You should check the newsgroup archives on http://eclipse.org for some
past discussions. The debate can become quite heated, so you may not
want to start it again :-)

Charlie


robert wrote:
> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>
Re: SWT over Swing [message #452394 is a reply to message #452383] Sat, 19 March 2005 10:56 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
Ideally we should have Swing implemented in the way SWT is implemened.
Unfortunately, the quality of Swing is not up for the expectation of average
Windows or Mac users. It might OK for Unix or Linux users. You don't expect
to develop commercially viable GUI intensive applications targeted for
Windows users using AWT or Swing. For exmple, if you use Swing, you cannot
use the basic copy & paste, or scrollers on your laptop, etc. Graphics are
shoddy.
Simply not feasible to write maketable s/w using Java. Your best bet with
Java is
server side where your Java hide behind good looking Windows browsers! So is
the problem for Java in desktop applications! Because of this, you will
hardly find
well-known Java-based commercial desktop applications!

I have 150,000-line Java application written in AWT. I did converted into
Swing, then
found that version was complete crap because Swing is crap. So I had to go
back to
AWT and develop custom widgets not provided by AWT such as combobox etc.
I have been researching SWT to migrate my application from AWT to SWT.
I migrated to Swing using adaptors. However it's not possible to develop
adaptors for
SWT. So if I migrate to SWT, virtually I have to rewrite almost everything!

So is my dilema. I really don't think I will rewrite this in another Java.
GUI presentation of SWT is far better than Swing and AWT. But it still has
serious shortcommings. If I rewrite, I may have to use Visual Basic that
I used to hate to use. I really hope that Sun should have done better job
in this aspect.

So you got the story!








"robert" <robert.cleary@ul.ie> wrote in message
news:d1fd28$unc$1@www.eclipse.org...
> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>
Re: SWT over Swing [message #452401 is a reply to message #452394] Sat, 19 March 2005 22:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

So you're essentially saying in order to have a UI up to the expectation
of average Windows or Mac users you have to give up platform-independence?

I'm also curious about the reference to Mac users, since Apple maintains
the AWT/Swing implementation on that platform and they at least think
they're providing as close to a native l&f as they can. In fact, I
talked to an Apple representative at EclipseCon who told me they were
looking to hire an SWT/Cocoa expert so they could do a Cocoa port of
SWT. I guess this is a long way to ask, what's so bad about AWT/Swing on
windows? Is it better or worse than the SWT/Carbon port?

Bob Foster

John Smith wrote:
> Ideally we should have Swing implemented in the way SWT is implemened.
> Unfortunately, the quality of Swing is not up for the expectation of average
> Windows or Mac users. It might OK for Unix or Linux users. You don't expect
> to develop commercially viable GUI intensive applications targeted for
> Windows users using AWT or Swing. For exmple, if you use Swing, you cannot
> use the basic copy & paste, or scrollers on your laptop, etc. Graphics are
> shoddy.
> Simply not feasible to write maketable s/w using Java. Your best bet with
> Java is
> server side where your Java hide behind good looking Windows browsers! So is
> the problem for Java in desktop applications! Because of this, you will
> hardly find
> well-known Java-based commercial desktop applications!
>
> I have 150,000-line Java application written in AWT. I did converted into
> Swing, then
> found that version was complete crap because Swing is crap. So I had to go
> back to
> AWT and develop custom widgets not provided by AWT such as combobox etc.
> I have been researching SWT to migrate my application from AWT to SWT.
> I migrated to Swing using adaptors. However it's not possible to develop
> adaptors for
> SWT. So if I migrate to SWT, virtually I have to rewrite almost everything!
>
> So is my dilema. I really don't think I will rewrite this in another Java.
> GUI presentation of SWT is far better than Swing and AWT. But it still has
> serious shortcommings. If I rewrite, I may have to use Visual Basic that
> I used to hate to use. I really hope that Sun should have done better job
> in this aspect.
>
> So you got the story!
Re: SWT over Swing [message #452402 is a reply to message #452401] Sun, 20 March 2005 00:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

I meant, of course, "what's so bad about AWT/Swing on MacOSX?" :(

Bob

Bob Foster wrote:
> So you're essentially saying in order to have a UI up to the expectation
> of average Windows or Mac users you have to give up platform-independence?
>
> I'm also curious about the reference to Mac users, since Apple maintains
> the AWT/Swing implementation on that platform and they at least think
> they're providing as close to a native l&f as they can. In fact, I
> talked to an Apple representative at EclipseCon who told me they were
> looking to hire an SWT/Cocoa expert so they could do a Cocoa port of
> SWT. I guess this is a long way to ask, what's so bad about AWT/Swing on
> windows? Is it better or worse than the SWT/Carbon port?
>
> Bob Foster
>
> John Smith wrote:
>
>> Ideally we should have Swing implemented in the way SWT is implemened.
>> Unfortunately, the quality of Swing is not up for the expectation of
>> average
>> Windows or Mac users. It might OK for Unix or Linux users. You don't
>> expect
>> to develop commercially viable GUI intensive applications targeted for
>> Windows users using AWT or Swing. For exmple, if you use Swing, you
>> cannot
>> use the basic copy & paste, or scrollers on your laptop, etc. Graphics
>> are
>> shoddy.
>> Simply not feasible to write maketable s/w using Java. Your best bet with
>> Java is
>> server side where your Java hide behind good looking Windows browsers!
>> So is
>> the problem for Java in desktop applications! Because of this, you will
>> hardly find
>> well-known Java-based commercial desktop applications!
>>
>> I have 150,000-line Java application written in AWT. I did converted into
>> Swing, then
>> found that version was complete crap because Swing is crap. So I had
>> to go
>> back to
>> AWT and develop custom widgets not provided by AWT such as combobox etc.
>> I have been researching SWT to migrate my application from AWT to SWT.
>> I migrated to Swing using adaptors. However it's not possible to develop
>> adaptors for
>> SWT. So if I migrate to SWT, virtually I have to rewrite almost
>> everything!
>>
>> So is my dilema. I really don't think I will rewrite this in another
>> Java.
>> GUI presentation of SWT is far better than Swing and AWT. But it still
>> has
>> serious shortcommings. If I rewrite, I may have to use Visual Basic that
>> I used to hate to use. I really hope that Sun should have done better job
>> in this aspect.
>>
>> So you got the story!
Re: SWT over Swing [message #452403 is a reply to message #452394] Sun, 20 March 2005 00:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

This is preposterous. Swing performs perfectly fine. I was just fine
for me in the days of 233MHz AMD K6, its certainly fine in the days of
2GHz. Something wrong with your implementation.

And to say that SWT is better implemented that Swing is equally as
preposterous. SWT is promising and is up and comming. But Swing is
fully established.

CL


John Smith wrote:
> Ideally we should have Swing implemented in the way SWT is implemened.
> Unfortunately, the quality of Swing is not up for the expectation of average
> Windows or Mac users. It might OK for Unix or Linux users. You don't expect
> to develop commercially viable GUI intensive applications targeted for
> Windows users using AWT or Swing. For exmple, if you use Swing, you cannot
> use the basic copy & paste, or scrollers on your laptop, etc. Graphics are
> shoddy.
> Simply not feasible to write maketable s/w using Java. Your best bet with
> Java is
> server side where your Java hide behind good looking Windows browsers! So is
> the problem for Java in desktop applications! Because of this, you will
> hardly find
> well-known Java-based commercial desktop applications!
>
> I have 150,000-line Java application written in AWT. I did converted into
> Swing, then
> found that version was complete crap because Swing is crap. So I had to go
> back to
> AWT and develop custom widgets not provided by AWT such as combobox etc.
> I have been researching SWT to migrate my application from AWT to SWT.
> I migrated to Swing using adaptors. However it's not possible to develop
> adaptors for
> SWT. So if I migrate to SWT, virtually I have to rewrite almost everything!
>
> So is my dilema. I really don't think I will rewrite this in another Java.
> GUI presentation of SWT is far better than Swing and AWT. But it still has
> serious shortcommings. If I rewrite, I may have to use Visual Basic that
> I used to hate to use. I really hope that Sun should have done better job
> in this aspect.
>
> So you got the story!
>
>
>
>
>
>
>
>
> "robert" <robert.cleary@ul.ie> wrote in message
> news:d1fd28$unc$1@www.eclipse.org...
>
>>Hi, I have just recently heard of SWT, and i would like to know -
>>essentially - why I should use it above the java Swing framework?
>>
>
>
>
Re: SWT over Swing [message #452404 is a reply to message #452383] Sun, 20 March 2005 00:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

robert wrote:
> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>


This is how i break it down.


AWT is native OS widgets that look like the native OS. But since each
native OS is a bit different, you will end up with slight differences in
each of your AWT implementations. Like some sizeing things that dont
quite work out.

Swing is common widgets that look the same no matter where you deploy.
(Essentially a Java Look) You only write the GUI code once.

SWT is native widgets that look like the native OS, but tries to let you
write it just once. Tries to be fast like AWT and write once like Swing.

Its not about speed. Once you embrace OO you have already made a
philosophical choice to embrace code manageability over code speed. But
dont take that to mean any of these implementations are slow. I have
never written a slow java app.



CL
Re: SWT over Swing [message #452405 is a reply to message #452404] Sun, 20 March 2005 02:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Ok except this part...

CL [dnoyeb] Gilbert wrote:
> Swing is common widgets that look the same no matter where you deploy.
> (Essentially a Java Look) You only write the GUI code once.

Swing has a look and feel that is the same everywhere (metal) but also
has platform l&fs that look like MacOSX on MacOSX (because Apple
maintains it), somewhat like Windows on Windows, etc.

Bob Foster
Re: SWT over Swing [message #453242 is a reply to message #452383] Fri, 01 April 2005 18:40 Go to previous messageGo to next message
Brian Hudson is currently offline Brian HudsonFriend
Messages: 17
Registered: July 2009
Junior Member
You will find very heated arguments/debates on Swing versus SWT all over
the net.

I use both, each and every day. I am involved with two projects at work.
One uses Swing, the other SWT.

Each project has its own reasons for using Swing/SWT.

The project that uses Swing, has two main reasons for doing so
1 - For the most part the project outdates SWT.
2 - It uses OpenMap, which is a Swing based mapping component

The second application is written in SWT. I was hired to take a R&D
project written in C++/MFC, convert it to Java and make it a
"production' quality product.

The reason we went with SWT over Swing are numerous but here are a few:
1 - It is supposed to be a production/commercial quality product. To me,
that meant it should look and behave like a native application would. in
this area, Swing didn't cut it.

2 - Ease of development. I can create a better looking application
faster, and more reliably with SWT/JFace than Swing.

3 - Eclipse RCP. The Eclispe RCP makes it very easy to make a
professional looking application quickly. It also allowed us to take
advantage of the Elcipse plugin archeticture.

Having built large GUI systems on both, I will always try to use SWT in
the future.

robert wrote:
> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>
Re: SWT over Swing [message #453275 is a reply to message #453242] Sun, 03 April 2005 17:14 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">Brian is right on, I think.  There are significant
reasons to use both.  I don't think either one is the catch all
solution for every situation.  Just as a rather glaring example, SWT
doesn't support applets.<br>
<br>
The ultimate solution, really, would be if Sun would bundle a
distribution of SWT with Java.  This would definitely ease all
developer's headaches.  I'm aware of both the logistical, and the
business reasons not to do this, but it still stands as the best
solution on the developer side.  Sun can't simply continue to ignore
SWT.  And this goes for every Java developer:  Like it or not, SWT is
here to stay.  Try as you might to discount / discredit it, SWT is and
will continue to become a major force in client side Java.  I'm not
saying that it will ever fully replace Swing, it probably won't.  But I
am saying that it's earned a place in the Java distro.<br>
<br>
Daniel<br>
</font><br>
Brian Hudson wrote:
<blockquote cite="midd2k4lv$2oo$1@news.eclipse.org" type="cite">You
will find very heated arguments/debates on Swing versus SWT all over
the net.
<br>
<br>
I use both, each and every day. I am involved with two projects at
work. One uses Swing, the other SWT.
<br>
<br>
Each project has its own reasons for using Swing/SWT.
<br>
<br>
The project that uses Swing, has two main reasons for doing so
<br>
1 - For the most part the project outdates SWT.
<br>
2 - It uses OpenMap, which is a Swing based mapping component
<br>
<br>
The second application is written in SWT. I was hired to take a R&amp;D
project written in C++/MFC, convert it to Java and make it a
"production' quality product.
<br>
<br>
The reason we went with SWT over Swing are numerous but here are a few:
<br>
1 - It is supposed to be a production/commercial quality product. To
me, that meant it should look and behave like a native application
would. in this area, Swing didn't cut it.
<br>
<br>
2 - Ease of development. I can create a better looking application
faster, and more reliably with SWT/JFace than Swing.
<br>
<br>
3 - Eclipse RCP. The Eclispe RCP makes it very easy to make a
professional looking application quickly. It also allowed us to take
advantage of the Elcipse plugin archeticture.
<br>
<br>
Having built large GUI systems on both, I will always try to use SWT in
the future.
<br>
<br>
robert wrote:
<br>
<blockquote type="cite">Hi, I have just recently heard of SWT, and i
would like to know - essentially - why I should use it above the java
Swing framework?
<br>
<br>
</blockquote>
</blockquote>
</body>
</html>
Re: SWT over Swing [message #453964 is a reply to message #452383] Thu, 14 April 2005 22:57 Go to previous message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
If you develop commercial s/w aiming Windows users as main users,
you have no other choice than not to use Swing. Your product will never
be attractive to Windows user!

Alternative might be SWT. If SWT still not good enough, then
Visual Basic/C++ will be the options.

I struggled many years with the graphical quality of Swing. SWT can
make your system look a lot better. So choice is if you write systems
aiming for Windows users commercially, never put your money on Swing!



"robert" <robert.cleary@ul.ie> wrote in message
news:d1fd28$unc$1@www.eclipse.org...
> Hi, I have just recently heard of SWT, and i would like to know -
> essentially - why I should use it above the java Swing framework?
>
Previous Topic:Would be a SWING port of SWT sucessful?
Next Topic:combo and FocusLost event
Goto Forum:
  


Current Time: Tue Apr 23 14:15:39 GMT 2024

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

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

Back to the top