Added support for JavaFX