What rocks about using JavaFX 2 (esp. compared to Swing!)

Home

News: What rocks about using JavaFX 2 (esp. compared to Swing!)

  1. When testing out JavaFX 2, you might notice that it borrows a lot of concepts from Java EE, like binding and controllers. But another thing is that JavaFX 2 let’s you build desktop app UIs with XML. Indeed, one of the biggest additions is the addition of FXML, a new-ish kind of file that contains all the controls of your UI. The benefits are that it is simple to understand, and even though there is no Java code, there are some imports like in a Java class.

    The addition of properties in JavaFX 2 lets you encapsulate a Java type: String, int, boolean etc, and can have listeners. There is also a chart API for creating, customizing and interacting with charts, which are dynamically updated when the data set changes. You get a media engine that supports audio and video streaming, a web engine that gives you a WebKit based browser for web content within your app, plus custom component creation, ImageOps and 3D support that comes along with Java 8

    Two additional features increase your ability to do rapid application development with JavaFX 2: first, there is SceneBuilder, which lets you drag-and-drop components into the scene and from there generate an FXML file—CSS previewing is also built-in. ScenicView allows developers to change components and modify CSS while the app is running, so you can see results on the fly.

    All in all, JavaFX 2 is better than Swing by orders of magnitude, and improves upon JavaFX 1 in all the ways we hoped for. Maybe it’s time to give it a shot…

    http://zeroturnaround.com/rebellabs/why-im-so-excited-about-migrating-from-swing-to-javafx-2/

    Threaded Messages (5)

  2. Looks to me like a typical web developer design, because that's all they know. I'll stick to MiG Layout and JIDE for now thank you.
  3. With Java FX2, there is no need to ceate class that extend JFrame. It is easy to use than swing.
  4. Swing[ Go to top ]

    Funny, I never found Swing that hard to use. Especially with tools like JIDE and JFormDesigner

  5. From my point of view, Oracle targets to unify the the development process and concept of web(especially, JSF) and RIA applications, and the most important is the direction of JavaFX should be for enterprise level applications. In short, the trend is that JSF can generate HTML application and JavaFX RIA applications.

    Swing is fading out.

  6. somewhat[ Go to top ]

    While I like a lot that JavaFx has to offer, "coding" in XML is not one of them - i.e. it is not a selling point.