tags:

views:

521

answers:

11
+1  Q: 

Java GUI libraries

I have been working with the Swing library for a long time, I'm working on a new project for school and due to the nature of the program it can't look like a generic/boring swing gui. So my question is does anyone know of an interesting java gui library that is not swing or awt?

+4  A: 

The Standard Widget Toolkit : http://www.eclipse.org/swt/

Pierre
Then it will look like a generic/boring Windows gui. ;)
Michael Myers
@mmyers : Only if you are on Windows. ;)
James Van Huis
I'm sure you could get other implementation to run under Windows.
Tom Hawtin - tackline
+2  A: 

I think that SWT/JFace (come with Eclipse but can supposedly be used standalone) are well designed and more interesting to use/learn. For example, JFace follows sort of an MVC approach.

Uri
+2  A: 

JavaFX perhaps?

Boden
Is this something he can use today to build anything useful?
cherouvim
Sure, why not? It's done and in the wild.http://www.indicthreads.com/interviews/1180/javafx_script_client_java_swing_ria.html
Boden
Thanks, this might be perfect for what I'm doing!
+6  A: 

If you think that Swing produces boring UIs then you really need to get this book: Filthy Rich Clients.

cherouvim
John is it worth it? I am itching to use Java for some desktop pet projects but the GUI framework is an obstacle. I was more that happy with Qt Jambi but since it is discontinued I started looking elsewhere. The book seems to primarily deal with graphics and animation while I 'm more interested on out of the box functionality.
Yorgos Pagles
@Yorgo I'm not a swing user but I think the book is definitely worth buying if you plan on building Swing apps. You are right about that it deals a lot with the funky aspect of UI's but the authors are very experienced and I'm sure you'll gain a lot by reading it. BTW I got it for free in a JUG event :)
cherouvim
+5  A: 

You could just use a new Look & Feel.

Pesto
A: 

Take a look at JavaFX. It is designed to be very flashy.

Kees de Kooter
A: 

I don't think you need to look at different GUI libraries, I think you need to look at different Look & Feels, I quite like Synthetica, plus some of their Look & Feels are free for non-commercial applications.

ninesided
+1  A: 

Well, if you use Java 6u10+, you can use the new Swing GUI option, Nimbus.

UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
R. Bemrose
+2  A: 

Try JGoodies

http://www.jgoodies.com/

Fabio Ceconello
A: 

You can also try Java Scenegraph "standalone" (ie. using only java + scenario, not javafx). But its documentation is not very good. Here's a code sample, using the scenegraph 1.0 ("Scenario.jar" shipped with JavaFX).

import java.awt.Color;
import java.awt.Paint;
import java.awt.geom.Point2D;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

import com.sun.scenario.scenegraph.JSGPanel;
import com.sun.scenario.scenegraph.SGGroup;
import com.sun.scenario.scenegraph.fx.FXText;



public class HelloWorldScenario101 implements Runnable {



    /**
     * @param args
     */
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new HelloWorldScenario101());
    }



    public HelloWorldScenario101() {
        //
    }



    @Override
    public void run() {

        this.frame = new JFrame();
        this.panel = new JSGPanel();
        this.text = new FXText();
        this.paint = new Color(255, 0, 0, 255);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setTitle("Hello World");
        frame.add(this.panel);
        frame.setContentPane(this.panel);
        scene = new SGGroup();
        this.text.setText("Hello World");
        this.text.setFillPaint(this.paint);
        this.text.setLocation(new Point2D.Float(10, 10));
        this.scene.add(this.text);
        this.panel.setScene(scene);
        frame.pack();
        frame.setLocationByPlatform(true);
        frame.setVisible(true);

    }



    private JFrame frame;

    private JSGPanel panel;

    private SGGroup scene;

    private FXText text;

    private Paint paint;



}
facildelembrar
A: 

I would strongly suggest Qt Jambi if it wasn't discontinued. You can check out the demo to see what your application will look like.
I am still waiting to see how the community driven effort will evolve before deciding to abandon it but I wouldn't start something that matters to me in Qt Jambi right now, but I think that it would be a good fit for your situation.

Yorgos Pagles