make desktop view in javafx work as it should