There are two versions of JavaFX. An interpreted version and a compiled version that generates class files. This can be seen at the netbeans plugin page:
http://javafx.netbeans.org/ I quote "The JavaFX Script plugin for Netbeans
IDE 6.1 supports the JavaFX Script language that is based on the OpenJFX compiler."
and
"The JavaFX Script plugins for Netbeans IDE 5.5, Netbeans IDE 5.5.1, Netbeans IDE 6.0 and Netbeans IDE 6.0.1 support the Interpreter-based version of the language."
If you try some of the OpenJFX code with the interpreter based plugin, you will find that it doesn't work.