X
  • Friday, March 27, 2015

JavaFX in JavaScript

By: Geertjan Wielenga | Product Manager

Did you know you can code JavaFX in JavaScript? See here, click to enlarge it:

Even simpler than the above, it can also be expressed in JavaScript like this:


For some context, see Adam Bien's latest YouTube clip:

Tip: When using JavaFX with Nashorn, set the '-fx' flag in the place where Adam uses '-scripting' above.

As Adam shows, you can debug Nashorn:

Finally, the code snippets in the screenshots above come from this repository by Bruno Borges, which I learned about from him in an excellent session by Bruno about Nashorn at JavaLand this week:

https://github.com/brunoborges/nashorn

Join the discussion

Comments ( 1 )
  • Software Development Perth Monday, April 13, 2015

    Looks like an impressive flexibility.

    Is there any technical advantage or using javascript rather than java (for someone who know more java than javascript)


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha