Can we develop very good looking UI in swing and if not what are alternatives

17,806

Solution 1

Swing is very flexible with regards to look-and-feel and you can certainly make very good looking applications with Swing.

I recommend the book Filthy Rich Clients by Chet Haase and Romain Guy if you want to learn how to make nice Swing GUI applications.

Solution 2

Check out pushing-pixels. Kirill is the author of Substance which provides a ton of new look and feel options for Swing. Here's a blog entry which shows a little bit of what is possible with Swing. There used to be a link to his 2007 presentation at Java One, but unfortunately the link no longer works.

Solution 3

You can make it look just about however you want. Especially if you write up your own look and feel. I've done it myself with semi-transparent panels and simplistic buttons.

Have a look at the screen shots at:

http://www.taranfx.com/best-java-swing-look-and-feel-themes-professional-casual-top-10

Nimbus is a new look and feel which is gaining popularity, and it looks very professional imo:

enter image description here

Solution 4

You can certainly create great looking UI's in Swing - applications such as NetBeans and IntelliJ IDEA have proved this amongst many others.

The only alternative Swing has is SWT(Eclipses toolkit), however it's not portable as Swing and not as flexible as well. It offers, however, faster performance and the use of native components, which might be what some people actually want.

There are Java bindings for most existing GUI toolkits as well - for example Java for Gnome and someone might find them interesting.

I however favour Swing's extreme portability, MVC adoption, pluggable look and feels, availability of lots of third party libraries with additional components(SwingX, JIDE, ...) and ease of use.

Btw for optimal results in Swing, choosing a good layout manager is essential - I recommend you to have a look at the almighty MiG layout.

Solution 5

Don't touch JavaFX 1 with a bargepole.

JavaFX 2 however looks very promising, with Oracle saying they're going to integrate it tightly to Java 8. It's got a very nice API behind it, it's graphically accelerated, you can skin it pretty much how you please using CSS3 and by default it looks pretty nice too.

Only caveat is that it's not available for Linux yet at all - but if you're looking to develop an application that's going to be released in the next couple of years or so, or you're not too fussed about waiting for cross platform support, it's a good option to consider.

Share:
17,806

Related videos on Youtube

Shekhar
Author by

Shekhar

I am a java developer

Updated on January 17, 2020

Comments

  • Shekhar
    Shekhar over 4 years

    In my current project we have to develop a good looking desktop based application in java.

    Currently, we have a very basic desktop application written in swing and team does not have good swing knowledge. Can we create a very good looking UI in swing?

    Should we use JavaFX for creating the desktop application?

    What are other alternatives to do this?

  • Hermann Hans
    Hermann Hans about 14 years
    +1 for mentioning Filthy Rich Clients. There's no better book for understanding the intricacies of Swing.
  • OscarRyz
    OscarRyz over 13 years
    I didn't knew Swing could look that good until I saw the samples in the book. Indeed the author now works in the fronend of Android.
  • mKorbel
    mKorbel over 12 years
    what did you talking about, can you be please little bit concrete, +1 for delete by comunity like as non_answer
  • Michael Berry
    Michael Berry over 12 years
    @mKorbel Not sure I quite follow you? I'm saying that JavaFX 2.0 can create good looking apps, and it may well be worth looking at it as an option since Oracle seem to be taking it seriously now.
  • mKorbel
    mKorbel over 12 years
    well good dream(s), but this project looks like as freeze as Java7, no progress
  • Michael Berry
    Michael Berry over 12 years
    @mKorbel Where do you get the idea that it's frozen from?! Are you looking at the old 1.x branch? JavaFX 2 has been updated extensively this year already and there's a timeline in place here for its continued development: javafx.com/roadmap Definitely not frozen!
  • mKorbel
    mKorbel over 12 years
    thanks for info, I hope that there will be progress, because there were (start with Fx2) Swing gurus that long time built SwingX ...