If I look at the code of a JavaFX application, I cannot stop comparing it to ExtJS. Only that JavaFX is much more flexible.
There you also have a similar script language mixed with plain javascript functions. Note that I have no experience with JavaFX