added sample how to use in JavaFX