Linked by Thom Holwerda on Sat 25th Feb 2006 19:40 UTC, submitted by anonymous
Java "Why is there more than one Java GUI tool kit? The best answer is that one size does not fit all, nor is there a one-size-fits-all GUI tool kit to be invented soon. Each tool kit offers advantages and disadvantages that make selecting one more appropriate, given your needs and intended audience. Read descriptions of each tool kit's basic features, and the pros and cons of using each."
Order by: Score:
None of them are ideal for me
by Lumbergh on Sat 25th Feb 2006 20:42 UTC
Lumbergh
Member since:
2005-06-29

AWT - well, pretty limiting and somewhat deprecated as far as a general purpose widget set I thought.

SWT - looks great (uses native fonts and other stuff), but is somewhat limited by its API. JFace is an adjunct to SWT, and then you have the Eclipse RCP (Rich Client Platform) to Eclipse technologies.

Swing - I'm pretty picky about how my apps look and Swing just doesn't cut it there. Even in Mustang I'm not so happy about the current fonts compared to cleartype. And Java 5 Swing on Linux is just atrocious. Sun should have looked at how Apple implements Swing.

None are ideal in my book, but these days I'm more interested in RIAs and not thick clients - even though a SWT/JFace/Eclipse RCP WebStart might not be bad.

Reply Score: 2

RE: None of them are ideal for me
by Tweek on Sun 26th Feb 2006 05:45 UTC in reply to "None of them are ideal for me"
Tweek Member since:
2006-01-12

granted there may be many legit reasons from your perspective of why swing doesnt cut it, but from the end user, in the looks department, they dont even notice and when they do notice it looks different, they simply dont care.

it is amazing, people seem to think swing is ugly (my point of view, it is ugly) however, the average end user doesnt care. they MIGHT notice it looks different, but even when they do, they dont care that much...

i have noticed that it takes more knowledge for the user (aka they are geek, they know what it was built in) for them to actually care

Reply Score: 1

Lumbergh Member since:
2005-06-29

As I stated in an earlier post, I believe most of the Swing development to be done in a corporate setting where the server side guys can leverage their skills and the end-user doesn't have much choice in the matter. Some users might not care and I'm probably more picky than your average user. The fonts just freaking kill me on an LCD and why Sun didn't make native L&F the default on Java 5 is beyond me.

But I think anyway you cut it, Java 5 Swing apps pretty much stick out like a sore thumb on any desktop.

Reply Score: 1

v They forgot the best one: Visual J++
by ronaldst on Sat 25th Feb 2006 21:28 UTC
ramunas Member since:
2005-07-06

Swing has one of the most beautiful GUI API's ever, you can not even dare to compare that to .NET's Windows.Forms. Windows.Forms is absolutly horid, it's just new (relatively) Delphi's VCL recarnation. Maybe MS will improve with XAML, but it's a dream that will never happen!

One of the things I like about Sun's Java it's excelent documentation. In MS world documentation is sold separatly (who have used msdn will know what I'm talking about): you have to buy some crappy book just to find out DataGrid's (etc.) interface.

Reply Score: 1

Kroc Member since:
2005-11-10

Er, the whole of MSDN is online. You can get it all on CDs for added ease by buying a subscription - optional.

http://msdn.microsoft.com

Reply Score: 1

ramunas Member since:
2005-07-06

Yes, I'm completly aware of that. But I was actualy talking about the quality of docs.

Reply Score: 1

cilcoder Member since:
2005-07-06

I've always thought of it as the other way around... I always thought most of microsoft's stuff was better documented/easier to use than their competitors... I mean, Sun has docs for java but they are provided in html(atleast that's all I found). With Microsoft's stuff you can go to the website if you like(which I don't) or you can use the(great) help browser with search and all that sort of stuff.

Reply Score: 1

SWt is ok!
by Leoandru on Sat 25th Feb 2006 21:42 UTC
Leoandru
Member since:
2006-01-15

Iv seen a few SWT apps and they are pretty ok in my books. azureus and rss owl, 2 apps I use almost everyday. Swing seems a little bit more robust than SWT on a whole, much more suited in developing complicated gui. swt give a more native l&f, sometimes its hard to tell that the gui was done in java.

Reply Score: 1

RE
by Kroc on Sat 25th Feb 2006 21:59 UTC
Kroc
Member since:
2005-11-10

Why is there more than one Java GUI tool kit?

because engineers cannot understand humans
because the source code is always over complicated
because not enough design is done before a single line of code is written
because compatibility has to be kept with a bad initial design, and some problems will never get fixed because of that
because a geek's idea of cool is anything but
because a geek's idea of simple is anything but

add your own...

Single platform toolkits are excellent, Coccoa, .NET etc., a cross platform kit isn't by default worse, these just require three times as much design and forethought, and that never gets done.

Reply Score: 3

SWT lacks cross platform BiDi support
by mksoft on Sat 25th Feb 2006 22:17 UTC
mksoft
Member since:
2006-02-25

SWT has full BiDi support (right to left UI) only on windows.

If you need cross platform BiDi support, Swing is the only choice among the 3.

Reply Score: 1

Not quite
by snowflake on Sat 25th Feb 2006 22:41 UTC
snowflake
Member since:
2005-07-20

>Swing has one of the most beautiful GUI API's ever,
>you can not even dare to compare that to .NET's
>Windows.Forms. Windows.Forms is absolutly horid,
>it's just new (relatively) Delphi's VCL recarnation.
>Maybe MS will improve with XAML, but it's a
>dream that will never >happen!

Although I applaud you for being a purist, in the real world what matters is how many GUI apps are actually deployed, in this case I think Java trails far behind winforms and even Delphi. It may be elegant but Java is a dog to use when you're designing GUI apps. It is possible to get nice GUI apps with Java but it takes a hell of a lot of effort.

Reply Score: 1

RE: Not quite
by AnonaMoose on Sat 25th Feb 2006 23:09 UTC in reply to "Not quite"
AnonaMoose Member since:
2005-08-11

It is possible to get nice GUI apps with Java but it takes a hell of a lot of effort.

Go have a look at Netbeans GUI builder, the only downside as with any WYSIWYG is the code is a little messy.
The whole GUI thing in Java is about as easy as it gets, if you think it is hard then you should consider another hobby.

Reply Score: 1

RE: Not quite
by thavith_osn on Sun 26th Feb 2006 00:02 UTC in reply to "Not quite"
thavith_osn Member since:
2005-07-11

I was gonna say the same thing, have a look at NetBeans IDE (version 5). I have used a few IDEs in my time, and NetBeans isn't the best, but it comes close I think in quite a few areas, and there are some nice touches in there.

Eclipse is very good too, but the Visual Editor is just horrible. I know a new version is in the works that will hopefully solve these issues (as Eclipse has some really nice functionality that NetBeans doesn't). There are also other visual editors you can get for Eclipse too, I've only tried one so far...

NetBeans uses a spring layout manager, I thought the form layout manager was good, but the spring manager eclipes it imho.

So if you are interested in Java/Swing dev, check out NetBeans 5, I think you will be glad you did...

Reply Score: 1

All online
by snowflake on Sat 25th Feb 2006 22:43 UTC
snowflake
Member since:
2005-07-20

>In MS world documentation is sold separately

Nope, MS Docs are ALL online for anyone to read!

Reply Score: 1

Better things to do with my time
by snowflake on Sun 26th Feb 2006 00:07 UTC
snowflake
Member since:
2005-07-20

>The whole GUI thing in Java is about as easy as it gets,
>if you think it is hard then you should consider another
>hobby.

Thanks for the adivce but GUI development on modern IDEs it pretty trvial, the hard part is and I guess always will be stylistic and usability issues, something IDEs are not so good at.

I tried the new Netbeans and I found that it still falls short of other environments in terms of rapid GUI development, the designer is ok but the backend code generation and hooking to events is messy. There is too much plumbing involved in programming GUI code in Java for my liking .This is a personal choice, its has nothing with it being too hard, its just I have better things to do with my time.

Reply Score: 2

suryad Member since:
2005-07-09

Things are progressing in terms of Netbeans and ease of creating GUIs. There are a lot of projects going on like Swinglabs and so on that makes things a lot easier for example gettnig events and retrieving data from a dbase and displaying in gui and so on. They will prob be integrated in Java. I think Java is a great language to use but it is suffering from its own success. Right now I am using Netbeans 5.5 and despite having a powerful enough computer it still feels like a very very heavy app. Azureus is the only Java app I have used that does not feel that heavy to me.

Java is progressing but it is not fast enough IMO. In that respect I think the MS implementation in C# is quite good because I think they saw the mistakes Sun made with Java and they just didnt repeat those. I dont and wont understand for the life of me why Java for example, you need 1 virtual machine for 1 app. So if you are running 2 apps you will have 2 instances of the VM and honestly that is a huge amount of bloat.

Still I think Netbeans is making the most progress. I really enjoy using Netbeans. It still has a lot of way to go but it is the best what we can use so far I think.

Reply Score: 1

Dead horse
by cb_osn on Sun 26th Feb 2006 01:20 UTC
cb_osn
Member since:
2006-02-26

I find it interesting that the most popular (and most mentioned) Java GUI apps are usually Eclipse (SWT) and Netbeans (Swing). It seems that the only people who are really willing to use Java GUI apps are Java developers... maybe we should stop beating a dead horse?

Reply Score: 4

RE: Dead horse
by Lumbergh on Sun 26th Feb 2006 01:41 UTC in reply to "Dead horse"
Lumbergh Member since:
2005-06-29

I find it interesting that the most popular (and most mentioned) Java GUI apps are usually Eclipse (SWT) and Netbeans (Swing). It seems that the only people who are really willing to use Java GUI apps are Java developers... maybe we should stop beating a dead horse?

There's a lot of truth to that. There are quite a few thick clients, specialized for a particular business that are written in Swing, (and I guess to a lesser extent SWT), but as a general, mainstream client technology, Java is all but dead.

Sun just took too long to get something out that didn't look and behave completely foreign on all desktops. And since the vast majority of desktops are windows and Microsoft has .NET...

Reply Score: 3

RE[2]: Dead horse
by abhaysahai on Sun 26th Feb 2006 02:40 UTC in reply to "RE: Dead horse"
abhaysahai Member since:
2005-10-20

Sorry, I got a little confused. I am a plain unix/C programmer with no experience on GUI design.
I was starting (a hobby project ) a desktop application and was planning to use Java for it, main reason that the same code will work on my Windows partetion too. I had also considered using mono, but decided against it as some of my friends work on Java and I can get some help from them, not even a single friend of mine uses mono.
My confusion is if .Net is better than Java then I can be the first one to learn mono and use the same base code ( -UI) to make it run on windows..
Please suggest

Reply Score: 1

RE[3]: Dead horse
by Lumbergh on Sun 26th Feb 2006 05:03 UTC in reply to "RE[2]: Dead horse"
Lumbergh Member since:
2005-06-29

Well, if you're a Unix guy and you're going to be developing on Unix then my first instinct is to say you might want to use Java. You have two very good open source IDEs and a mature J2SE.

Let me tell you what I see as the pros and cons of both platforms

Java Pros:
-excellent crossplatform support and excellent crossplatform tools

-a huge amount of open source code

-many choices on the server side (not sure if you'd be interested in that)

Java Cons:
-Surprisingly limited developer interest among the open source desktop crowd

-Swing is pretty damn fugly on Linux/Unix

-As stated before, probably will never be a major factor on the client. I still hold out hope that Sun will make some architectural changes to the VM in order to make it more language neutral and also develop(or adopt) a nice RAD language that plays nicely with the JVM and class libraries


.NET pros:
-Coming from a C++ background I prefer the C# language and the class libraries. Your mileage might vary coming from a straight C background.

-A better virtual machine. The CLR is more powerful than the JVM and even languages like C++ can be compiled down to IL. Then you have languages like Boo, IronPython, VB, and even a Ruby.NET compiler coming out hopefully soon. There are other languages for the JVM, but they've never seemed to have a whole lot of traction - even though Scala is a very interesting language.


-Will be a factor on the desktop for many years to come just for the mere fact that most windows development will be done targetting the CLR/IL. There even seems to be much more thick client development in at least the Gnome world compared to Java because of Mono.

.NET cons:

-Mono will always be a second-class citizen compared to .NET even though Novell/Ximian have produced a lot of goodcode. I don't know how close they are to the full .NET 2.0 suite as of now.

-Bad IDE support

Java actually might be the better fit for you, but if you want crossplatform, fun gui development have you taken a look at Ruby? It has nice gtk+ bindings, and runs good on windows. I think the Qt/Ruby bindings are shaping up nicely too.

P.S. The gtk+ bindings for Mono should run pretty well on Windows too...and actually look better than Swing.

Reply Score: 3

RE[4]: Dead horse
by abhaysahai on Sun 26th Feb 2006 14:29 UTC in reply to "RE[3]: Dead horse"
abhaysahai Member since:
2005-10-20

Thanks Lumbergh,
My aim is to learn, language is not a constraint. After your comments, specially that CLR is more improved than JVM, I googled for GTK+ on windows and found gaim, grisbi as very good looking UI Applications.
"
-Bad IDE support
"
Either way, I am not too comfortable with IDEs.
Going ahead with C#.
Thanks again for the advice.

Reply Score: 1

RE[4]: Dead horse
by anda_skoa on Sun 26th Feb 2006 15:06 UTC in reply to "RE[3]: Dead horse"
anda_skoa Member since:
2005-07-07

ava Cons:
-Surprisingly limited developer interest among the open source desktop crowd


Mainly due to Java or rather the Sun JDK not being available they way other frameworks are, i.e. easily installable through the usual installation mechanism.

Open source desktop developers want to specify the framework as a dependency which can be installed by a single command or listed as a package dependency in the application's package.

Fortunately the ongoing improvements on GNU/Classpath solve that problem for a growing number of use cases.

Reply Score: 1

RE: Dead horse
by Get a Life on Sun 26th Feb 2006 14:10 UTC in reply to "Dead horse"
Get a Life Member since:
2006-01-01

Now someone is going to flame you and bring up RSSOwl, JEdit or something. The increasing popularity of light-weight BitTorrent clients on Windows may or may not prevent the strategic Azureus strike.

Reply Score: 1

Java-Gnome
by JohnMG on Sun 26th Feb 2006 05:26 UTC
JohnMG
Member since:
2005-07-06

They left out Java-Gnome: http://java-gnome.sourceforge.net/cgi-bin/bin/view

It's too bad you can't search GnomeFiles.org to show you only apps written using Java-Gnome. (I've actually asked in the past about such search functionality, but IIRC, was told that the db is already in-place now, and it's too much trouble to add a new field to some table or other and then figure out implementation language for every project there and update the db accordingly.)

Reply Score: 1