JavaFX version 21 has been released. We’ve tailored down some of the most exciting parts of the release in this document.
On Mac platforms, JavaFX 21 requires macOS 11 or later. An exception will be thrown when initializing the JavaFX runtime on older versions of macOS.
On Linux platforms, JavaFX 21 requires GTK3 version 3.8 or later. An exception will be thrown when initializing the JavaFX runtime if the GTK 3 library cannot be loaded.
Exciting features:
Subscription
APIaddEvent*
and removeEvent*
have been added to EventTarget
interfaceGridPane(double hgap, double vgap)
canStartNestedEventLoop
which can used to check whether it is safe to start a nested event loopunderlineShape(int, int)
to enable spellchecker decoration (squiggly line) under text regionshowColumnMenu(mouseEvent)
, allowing developers to customize the behaviour when the table menu button is clickedNew
section.Improvements:
ObservableList
The community came together to fix 63 bugs in the last 6 months. Following are major bug-fixes that went into JavaFX 21:
Match.getPseudoClasses
used to return an instance PseudoClassState
, which is a private classNPE
for drag and drop eventsFinally, these are some dependency upgrades in JavaFX 20:
A more comprehensive list of all the changes in JavaFX 21 can be found on Github.
Kudos go to the fine people at Gluon who took care of the bulk of the work on JavaFX 21. Do check their JavaFX Long Term Support services.