converted to javafx