Friday, December 5, 2008

JavaFX 1.0

I have just upgraded the JavaFX demo to work with the all new JavaFX 1.0 release. Alas only the Windows and Mac versions are available as of now, but thanks to this post I was able to get JavaFX 1.0 running on my Linux box.

As far as I can say, there have not been tremendous changes to the API from the pre-release to the final version. I had to adapt some import statements. Rectangle (and probably other shapes) moved from javafx.scene.geometry to javafx.scene.shape and the Font class move from javafx.scene to javafx.scene.text. The font style handling changed a bit, there is no FontStyle class anymore, but multiple boolean attributes on the Font object to control its style. The biggest change is probably that there is no javafx.application package anymore, the entry point of an JavaFX application is the javafx.stage.Stage class now.

On the tool side some compiler options changed or have been removed (-target does not exist anymore), and the applet parameter applicationclass has been renamed to MainJavaFXScript.

Check out the JavaFX homepage they have tons of examples there. Ohhh, and of course have a look at the updated GwtAI JavaFX demo and its source code.