Java 6 and Swing on Linux

Michael Torrie torriem at chem.byu.edu
Mon Nov 20 19:24:09 MST 2006


On Mon, 2006-11-20 at 11:07 -0700, Bryan Sant wrote:
> I don't mind SWT's API or the architecture per se.  What I don't like
> about it is, 1) it doesn't come with the JDK by default (so you get an
> extra 3 - 4MB to download with your app), and SWT doesn't have a sweet
> GUI builder like the one that exists for Swing in NetBeans.  Eclipse
> has an SWT GUI builder plugin, but it is pretty sorry compared to
> NetBeans.

I have not programmed in Swing or SWT, but from what I've been told,
Swing is a much nicer framework.  SWT is less abstracted, has a slightly
different object model, and is more like the old AWT.  It also doesn't
quite hide all the platform differences.  But I could be wrong, as I
have no experience in this area.

> 
> Other than fonts did you find anything else in the GTK emulation that was off?

A few areas (fairly minor):
- combo boxes (using clearlooks, default FC6 theme) were not drawn
right.  The text box part wasn't drawn with a defined border and the
drop-down button was not right either.  The button didn't really look
like it was part of the combo box.  Read-only combo boxes have a
different style than entry combo boxes in GTK normally.  Swing doesn't
seem to draw the correct GTK style.  Also the colors in the drop-down
box aren't quite right.  They should be the normal white fg color,
instead they are grey (like the button face color).
- Scroll bars - scroll bars don't have the rounded button ends that the
clearlooks theme normally has.  Firefox also has this problem.
- Tabbed widgets - These have small drawing artifacts around the bottoms
of the tabs (where they stick out of the pane)
- Frames (this is more of a designer issue) - GTK no longer use defined
frames to isolates parts of a dialog box.  Instead apps use bolded
headings and indented areas below them.  This is not a Swing issue per
see but rather an issue the programmer should consider when targeting
Linux.
- toolbar - The toolbar on the swingset demo defaults to having raised
buttons, which looks quite tacky on linux.  Also the toolbar doesn't
integrate with the rest of the gtk or gnome apps as far as style goes
(icons, text and icons, text beside icons, etc).  Likely not really a
Swing issue, but something a user will notice straight away.

So yes the issues are minor and nit-picky.  Whether or not a user will
notice, I cannot say.

Michael

> -Bryan
> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
> 




More information about the PLUG mailing list