moving things from Swing to JavaFX