During a recent trip to Sun Microsystems’ customer briefing centre in London I sat through an enjoyable overview of JavaFX and its short-term future. While I had heard of it before, it was interesting to see how easily exciting interfaces could be put together. I couldn’t help but think how several things I have implemented in Java could have been implemented much more quickly in JavaFX, so I decided to spend a few hours trying it out.
There’s lots of great example code at javafx.com, which provides a good starting point. As can be expected, it is very similar to Java, and any Java developer should be able to start writing code almost straight away. The obvious choice was to write a simple PDF viewer, which I then did using spare moments over the past week or so. The result is JPedalFX – an attempt at a clean and simple viewer.
My only complaint with JavaFX is the lack of ability to compile to a standard jar file which will run on the JVM. While you can do so by including the JavaFX jars in your product, it is apparently not allowed under JavaFX’s licensing. In any case, deployment via Webstart is the preferred option, which (hopefully) suits JPedalFX well.
Over all, I am impressed at how quickly you can learn and develop in JavaFX, and the quality of the resultant applications. JavaFX is a much needed step towards putting UI design in the hands of designers rather than programmers, but it also provides a framework in which programmers can more easily create exciting interfaces.