“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.”
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.
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
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.
Microsoft’s Java was always better than Sun’s Java. And Java’s replacement, C#, rocks the house. Each time I go back to Sun Java, I pity the fools who have to deal with Sun Java everyday.
It’s amazing how they only covered the buggy (SWT), the horribly bloated (SWING) and obsolete (AWT). DotNet is a much better java dev env for devs. Especially when doing client/desktop apps.
Edited 2006-02-25 21:32
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.
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
Yes, I’m completly aware of that. But I was actualy talking about the quality of docs.
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.
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.
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.
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.
>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.
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.
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…
>In MS world documentation is sold separately
Nope, MS Docs are ALL online for anyone to read!
>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.
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.
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?
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…
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
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.
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.
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.
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.
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.)