Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

choosing Swing

Thread view: 
Hawkeye - 11 Jan 2004 17:40 GMT
Have there been any independent articles outlining the positives and
negatives of choosing
Java Swing over C#/.Net and vice versa? I did a lot of search over the past
few days
on the internet and in the newsgroups and while I have been able to gather a
bunch of
useful info most of the articles are biased, and the discussions quickly
degenerate into
flame wars.

I am especially interested in advantages and disadvantages of using
Swing when knowing that the client platform is going to be Windows

Thanks for your help
Chris Smith - 11 Jan 2004 19:24 GMT
> I am especially interested in advantages and disadvantages of using
> Swing when knowing that the client platform is going to be Windows

First off, I'm not extremely familiar with using C# for GUI development
in the .NET framework, so I'm not sure about the comparisons between the
appropriate .NET libraries and Swing.  Nevertheless, here's my
impression of the advantages and disadvantages of Swing as a GUI
library, independent of its cross-platform nature.

First and foremost, all things considered Swing is a fairly good
implementation of MVC using interface-based design.  That makes it very
easy to manage complexity in putting together an involved GUI for an
involved data model.

For example, I at one point inherited a GUI for (among other things)
managing an XML document, written in VB.  The product was riddled with
bugs, because every time some fairly complicated thing happened to the
structure of the XML document, it would also have to be repeated for a
set of tree controls that displayed the document.  The two would
frequently get out of sync and cause problems.  After experiencing this
problem for a few months, I was able to very quickly put together a Java
implementation of this same API, write a model adapter from a DOM tree
with the Level 2 events option to a TreeModel, and reproduce the user
interface with none of those problems.  Better yet, I don't have to
worry about ever facing such a problem again.

(Again, I don't know if GUI development for .NET improves upon what was
possible in Visual Basic or not; I can only speak for what I know.)

I also consider the flexibility of the Swing architecture to be a key
advantage.  For example, simply that the various complex controls such
as tables, lists, trees, etc. all delegate their low-level display to
renderers makes a lot of GUI development tasks much easier than they are
when the components are all rather discrete and separate, as they are in
many conventional GUI frameworks.

Layout managers are a huge plus for any GUI development based on the
fundamentals of AWT, so that advantage carries over to Swing.  Though
this way of doing layouts is sometimes painful to those accustomed to
working in other ways, the ability to describe what you *mean* in a
layout instead of laying out and handling resizing on a pixel basis is
invaluable.

As far as disadvantages, the top of that list for me will always be that
documentation is lacking in using some of the more remote corners;
particularly in look and feels and in some sections of the rich text
components - JEditorPane and JTextPane.

Swing performance will always be controversial, but I also feel safe in
making this statement about a disadvantage: it's probably easier to
obtain very high performance from most other GUI frameworks than it is
to obtain very high performance from Swing.

That's my initial thoughts,

Signature

www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Mendrik - 13 Jan 2004 15:22 GMT
Well my experience was, that .NET lacks a lot of common GUI components
(for example no moveable toolbar). Searching for free stuff on the
web, revealed that those additional stuff can be bought from 3rd
parties. Swing has almost everything atm, and you still get a lot of
stuff for free out there.

There are no seperate Layout Managers avaible. Even tho each component
has a "built-in" border layout. But that is often not enough.

I wasn't coding C# that long, so i never had a look if there is
anything like a replaceable Look&Feel (except default windows & xp
look)

About performance issues: swing guis and .NET guis don't make any
difference to me, sometimes i found .NET was an idea slower. But maybe
that was because i have ported GridBagLayout to #C#, where most
dialogues in .NET are supposed to be positioned absolutely.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.