Skip to end of metadata
Go to start of metadata

FxBuilder is a Groovy builder that wraps the JavaFX Script API




This project is no longer supported as JavaFX Script has been abandoned by Oracle since 2010.

FxBuilder is a Groovy builder that wraps the JavaFX Script API, allowing you to embed JavaFX content into a Swing application. You can mix & match it with other SwingBuilder based builders.




Drop fxbuilder-0.2 into $GROOVY_HOME/lib along with its dependencies

All these dependencies (except the JavaFX SDK) can be downloaded from this directory too.



FxBuilder requires that you have a working installation of JavaFX SDK 1.2.1, you need to be responsible for setting up the classpath properly. Make sure to skip $JAVAFX_HOME/lib/desktop/rt15.jar if working with jdk6.


Groovy 1.6.0 is the required minimum version to run FxBuilder 0.2
It is recommended that you upgrade to the 1.6.x series in order to take advantage of

  • @Bindable and ASTTransformations
  • short binding syntax
  • numerous enhancements made to SwingBuilder and FactoryBuilderSupport


Most of the JavaFX Script 1.2 code you see out there can be reimplemented in Groovy using FxBuilder, with some minor adjustments. The following JavaFX Script application

can be rewritten with FxBuilder like this

Notice the following changes:

  • FxBuilder uses map notation instead of object literals
  • the scene instance is automatically attached to it's parent: the stage
  • the scene's content is automatically attached to it's parent, no need to define a content: property or node.

Additionally you can:

  • set a Groovy closure anywhere a JavaFX Script function can be set
  • set a Groovy List anywhere a JavaFX Script Sequence can be set
  • content: property is automatically assumed given the build context, works on group() too.
  • any Swing component will be automatically wrapped via SwingComponent.wrap()
  • you can embed a JavaFX Scene in a JPanel (or any other Swing component) using the swingScene() node.


Andres Almiray

Source Control


FxBuilder uses Ant as its build tool, which means that if you want to
build your own version of FxBuilder from source you'll need to have it
installed. Follow the instructions at


Please contact the Griffon team members by e-mail.


Mailing List(s)

Issue tracker

  • No labels