Adding method that checks JavaFX presence