Skip to Main Content
JavaFX in Action
book

JavaFX in Action

by Simon Morris
October 2009
Intermediate to advanced content levelIntermediate to advanced
384 pages
13h
English
Manning Publications
Content preview from JavaFX in Action

Chapter 11. Best of both worlds: using JavaFX from Java

This chapter covers

  • Mixing JavaFX into Java programs
  • Calling JavaFX Script as a scripting language
  • Defining our Java app’s Swing UI in JavaFX
  • Adding JavaFX to the Java classpath

In previous chapters we saw plenty of examples demonstrating Java classes being used from JavaFX Script. Now it’s time for an about-face; how do we call JavaFX Script from Java?

Because JavaFX Script compiles directly to JRE-compatible bytecode, it might be tempting to assume we can treat JavaFX-created classes in much the same way we might treat compiled Java classes or JARs. But this would be unwise. There are enough differences between the two languages for assumption making to be a dangerous business. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaFX For Dummies

JavaFX For Dummies

Doug Lowe
Mastering JavaFX 10

Mastering JavaFX 10

Sergey Grinev

Publisher Resources

ISBN: 9781933988993Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link