JavaFX is a rapidly maturing technology, but its capabilities are still limited. In this installment of Open source Java projects, Jeff Friesen introduces you to JFXtras, utilities and add-ons that fill in useful features that are absent in JavaFX 1.0.
JavaFX 1.0 is missing a lot of functionality, especially in regard to UI components and layouts. To address these deficiencies, developer Stephen Chin initiated the JFXtras project in late 2008. He released JFXtras 0.1 shortly after JavaFX 1.0 debuted. This initial JFXtras release introduced dialog boxes, more layouts, a unit-testing framework, and asynchronous thread support to JavaFX.
The JFXtras 0.2 milestone, released in January 2009, adds a new library of custom shapes via integration with Andres Almiray's
jSilhouette Project, and it enhances 0.1's Grid layout, unit-testing framework, and more. With 0.3's release on February 17 (shortly after this article's completion), JFXtras
is becoming an increasingly significant part of the JavaFX landscape.
This article focuses on JFXtras 0.2. After introducing you to the project's software distribution, I demonstrate how to use the software via the NetBeans and command-line versions of JavaFX. I then explore JFXtras' various features, ranging from asynchronous thread support and a custom shapes library to unit testing and utilities classes.
Each of the Java projects covered in this series is subject to an open source license, which you should understand before integrating the project with your own projects. JFXtras is subject to the updated Berkeley Software Distribution (BSD) License. It is not subject to the simplified variant of this license or to any other license.
The JFXtras project site's downloads page provides links for downloading JFXtras-0.2.jar and JFXtras 0.2.zip. If you're interested in the custom shapes library, you must download the ZIP file, which includes JFXtras-0.2.jar and two other JAR files that provide the jSilhouette scene graph infrastructure for custom shapes. If custom shapes are of
no interest to you, you can download JFXtras-0.2.jar instead, but I recommend downloading JFXtras 0.2.zip. This archive's JFXtras 0.2 home directory contains the ChangeLog.txt, JFXtras-0.2.jar, and LICENSE.txt files. It also contains javadoc (API documentation), lib (jsilhouette-geom-0.3.jar and jsilhouette-scene-0.3.jar, custom shapes support JARs), src (JFXtras source code), and test (scripts for unit-testing JFXtras) subdirectories.
In addition to JFXtras 0.2, you need to install either NetBeans IDE 6.5 with JavaFX 1.0 or the JavaFX 1.0 SDK (if not already installed). Also, Windows platforms should have Java SE 6u10 or a higher update installed, whereas Macintosh platforms will benefit from Java 10.5 Update 2 (1.6.0_07). I developed this article's code with both JavaFX SDKs and Java SE 6u12 on a Windows XP SP3 platform.
Before exploring JFXtras, let's play with a couple of examples, to familiarize you with developing scripts in the context of the NetBeans and command-line versions of JavaFX 1.0. For our first example, check out Listing 1.
javafx.lang, javafx.util, and javafx.animation.
AbstractAsyncOperation class.
DockDialog.fx, part of WidgetFX.
I figured it out why I couldn't compile Main.fx.By Anonymous on March 17, 2009, 8:57 amI changed to use JFxtras-0.3.jar, now it works fine.
Reply | Read entire comment
I can't compile Main.fxBy Anonymous on March 16, 2009, 9:34 amfirst, thank for your document. I followed your step. But I got exceptions after I compiled Main.fx: the error message is below: java.lang.NoClassDefFoundError:...
Reply | Read entire comment
very well writtenBy Anonymous on March 8, 2009, 8:37 pmAn excellent job of explaining complex material. Thanks for sharing your work.
Reply | Read entire comment
Create more project.... By Anonymous on March 5, 2009, 6:12 amJava FX-The most pervasive and powerful mobile platform is now the most expressive. I learn more regarding this matter. Create more project....
Reply | Read entire comment
interesting sourcesBy Anonymous on March 2, 2009, 5:46 pmI found interesting sources about the installation of open source java projects featured by Jeff F.,last Feb.26.Keep up the good works.
Reply | Read entire comment
View all comments