migrated Swing code to JavaFX and Java 8