GUI in Java Revisited (2015)

Which GUI framework should I use for my Java application ?


Brief History:

AWT -> SWT -> Swing

When I had to choose which IDE gives me the best Swing WYSIWYG builder
Brief History:
Eclipse crappy builder -> Netbeans Matisse -> Google's Windows Builder (donated to Eclipse)


All of the above were my conclusions till 2014, but much had changed, HTML5 is rising with many many 3rd party frameworks Jquery MVC frameworks, JavaScript server side frameworks etc.

In the Java scene, Oracle has introduced JavaFX several years ago but it wasn't built specifically for forms, and it had it's labor aches.


Nowdays, JavaFX has matured much, Oracle has pushed Swing aside and introduced a very nice WYSIWYG form editor for JavaFX, and HTML5 isn't a myth but a very live framework.



So what are my conclusions?

Html5 sounds great, but I need some more straight forward out-of-the-box html5 with Java solution instead of a bunch of 3rd party Javascript libraries which should integrate with my Java code somehow.

I can use Wicket or GWT but those solutions are too heavy to my taste, so I will wait patiently for some other complete html5 with Java solution.



Till then, there is no doubt that Swing is a thing of the past and JavaFX is the present in Desktop GUIs.


Why?

There are too many articles about that, suffice to say that JavaFX was built with the present needs in mind versus Swing which was built a very long time ago and was slowly patched and re patched till production stopped!

Some nice things about JavaFX:
  • Built as purer MVC introducing FXML files for the GUI
  • Uses CSS out of the box
  • Compatible with touch screens
  • Better event captures (when the object changes it's color do the following...)
  • A beautiful WYSIWYG scene builder by Oracle - today, Eclipse & IntelliJ idea use this solution instead of inventing the wheel
  • Better anything - built on Swing's mistakes  :-)



How to start ?

Install latest JDK
Install Scene Builder from Oracle
Install your favorite IDE
Configure the IDE to point to the Scene Builder executable file

Start a JavaFX project, it will contain a basic FXML, right click on it - edit with SceneBuilder and WYSIWYG.


Read other tutorials for the details.

Comments

Popular posts from this blog

Profiling Java @ 2019

Shared/Pro/Managed Hosting for your site - which to choose ? (NO AFFILIATE LINKS!)

ZVR converter