How does javafx compare to swing in terms of features for griffon 1.2?


Question

Technically it has been "possible" to create a javafx/groovyfx based griffon application for quite a while.

How does swing compare to javafx nowadays ?

Can the latter be generally recommended for a fresh application without legacy baggage ?

Any gotchas to watch out for ?

How is the relationship griffon + javafx/groovyfx doing in general ?

1
5
1/27/2013 9:29:26 AM

JavaFX is the successor to Swing, and has many advantages over Swing, including:

  • A scene graph in which all nodes (e.g. UI components, shapes, images, containers) reside. This provides the ability to manipulate the properties of any node in UI with the result of affecting its contained nodes. For example, a Group containing some images may be rotated as a unit by applying a rotate transformation on the Group. Compare this to Swing, in which the UI is comprised of two separate worlds: UI Components and Java2D.

  • The WebView node is a WebKit port that that lets you embed a web browser in the scene graph.

  • CSS may be used for skinning the UI

  • FXML may be used to define the UI separately from the application logic. SceneBuilder, whose output is FXML, is a tool for drawing a UI.

There are currently some features that Swing developers mention that they miss, but you can take a look at the OpenJFX project http://openjdk.java.net/projects/openjfx/ and participate in this very active community to influence and contribute to future versions of JavaFX.

You may be interested in a technology position paper written by Björn Müller of CaptainCasa.com entitled "Why we use JavaFX" that discusses their architecture, including their decision to move from Swing to JavaFX http://captaincasa.blogspot.com/2013/01/why-we-use-javafx-paper.html

I hope this helps, and welcome you to check out the JavaFX Community site at javafxcommunity dot com to see the latest blog posts from JavaFX developers.

Regards, James Weaver Oracle Java Technology Ambassador

8
1/29/2013 1:03:56 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon