tags:

views:

9686

answers:

14

Which GUI Library is the best in Java? I'm very confused. Swing is very slow and very ugly. Can you guys tell me about a good GUI library that I can use in Java?

+1  A: 
  1. SWT by IBM. This is an alternative to swing
  2. Buoy - You can get it at buoy.sourceforge.net
Codeslayer
The Buoy link is wrong: http://buoy.sourceforge.net/
John Meagher
+7  A: 

I personnally prefer SWT over Swing, but it's not always possible to use it, for example in applets, where the downloading time has to be fast, I cannot justify to use it instead of Swing.

gizmo
+26  A: 

Swing is actually pretty snappy now, and the uglyness is mostly resolved by using the native-looking look & feel for each platform, or a nice looking, more general theme (engine) such as substance.

Adam Copp
Picking a decent layout manager, like JGoodies FormLayout, helps too
insin
I would choose MigLayout over any other
eugener
A: 

If your Swing application is slow than every other UI library would be as slow as well. Read some smart book or tutorial about smart UI development. Swing is as fast as every UI lib on the market (but much better designed compared to something bad like SWT).

+4  A: 

What version are you using? I've found, with care, Swing can be perfectly responsive...

It certainly shouldn't be ugly per se.

Oak
+9  A: 

I've always used Swing in combination with JGoodies Looks, which provides quite nice interface designs that integrate better into the user's operating system.

Swing also is NOT slow as long as you keep the interface design separated from the actual tasks performed by your view by correctly using the Event Dispatching Thread. See This link for more information on the subject.

davil
A: 

There are also ways to "prettify" Swing development by using one of those Swing XML libraries, like SwiXML, which let you define view layout with XML descriptors that get compiled to Swing code at application start.

Anyway, Swing in JSE 5 or 6 is pretty fast and also can look good when you enable platform specific look & feel.

macbirdie
+2  A: 

If you're writing a game in Java, then you should look at FengGUI which is a full UI library implemented in OpenGL (can use JOGL or LWJGL), and fully themeable on top.

Swing is now pretty fast, but I haven't used it in anger for a long time. SWT is really nice, but it's not really designed with the Java way of doing things. It's quite portable however, and uses native widgets where possible which is very important in my opinion.

JeeBee
Link: http://www.fenggui.org/doku.php
jamesh
+1  A: 

I suggest to check these criteria:

  1. SWT is more simple to use than Swing (especially if this is your first UI)
  2. Swing is older and you can find more components
  3. If you also use JFace, you will find many powerful widgets that work out of the box (where you would need a lot of additional configuration in Swing).
  4. Swing is available anywhere, SWT is not
  5. SWT is developed actively, you have the source and bugs are fixed quickly. Swing hasn't been touched in years, then there was suddenly a big update for Java 6. If you have an issue with Swing, well, Sun probably doesn't care.
  6. If you choose Swing, use a framework like SwingX. This will make your life much more simple.
Aaron Digulla
A: 

SWT should be the best option if you have "NO STRUCTURAL CONTROL of the JRE". Otherwise, Swing is a good option for minimum dependency/system requirement.

The bad of Swing is that it has very strong JRE of version dependency. All of undefined/undocumented detail of the UI behavior of GUI may change in next version. (e.g. a minor behavior of the cursor visibility in JTable was changed since JRE6.)

Sun may do a great job of the Swing implementation, but not all JRE vendor use the same implementation. If the Swing JRE has a bug, you will almost unable to fix it unless your client switch their JRE (e.g. slow JFileDialog browsing folder with large zip files)

If you use SWT, you can quite sure that it won't change by JRE upgrade. Yes, SWT does not have constant look & feel scroll different OS. However, it have constant look & feel & feature(e.g. native FileDialog) with others native application.

Dennis Cheung
A: 

Take a look at Jidebuilder and SwingX. If you want to jump to Groovy which is a more terse version of Java with closures. Have a look at Groovy builders in link below. If you go that far you might be inclined to look into Griffon. For more info. Follow this link. http://twitblogs.com/JGFMK/2009/07/27/best-swing-libraries-answer-for-stackoverflow Stupid stack overflow wouldn't let me post multiple links! JGoodies is quite nice too. As other poster commented.

A: 

Wow ... subastance engine looks pretty effective ... Does anyone have expirience with substance ? What about memory consumption ?

svlada
A: 

of course you can also use Qt (www.trolltech.com). It's simple, it looks pretty and it's, also like java, platform independent. For C++ you take Qt, for Java it's called Qt Jambi.

Berschi
+1  A: 

Wow Swing is Ugly I have heard this many Times because people just give it a try and see those Bluish Buttons and say it is old and ugly . But I think If you just change something like this com.sun.java.swing.plaf.windows.WindowsLookAndFeel inside program and nobody can tell difference whether it is Swing or Native Windows Program :)

Rohit Chauhan

Rohit Chauhan