(as suggested by @CyB3RC0nN0R) It is nice to see that JavaFX is less prone to shittyness than Swing is.