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


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

import javafx.stage.*;
import javafx.scene.*;
import javafx.ext.swing.*;

Stage {
  title: "FX"
  width: 100
  height: 50
  scene: Scene {
    content: {
      SwingButton {
        text: "Swing!"

can be rewritten with FxBuilder like this

import griffon.builder.fx.FxBuilder

new FxBuilder().stage(title: "FX", width: 100, height: 50) {
  scene {
    swingButton(text: "Swing!")

Notice the following changes:

Additionally you can:


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 http://ant.apache.org


Please contact the Griffon team members by e-mail.


Mailing List(s)


Issue tracker