Converted to JavaFX