JavaFX 21 Release Notes

The following contains all of the release notes for JavaFX 21 and OpenJFX 21 releases:

JavaFX 21.0.11

The following notes describe important changes and information about this release. In some cases, the descriptions provide links to additional detailed information about an issue or a change. These notes document the JavaFX 21.0.11 release. This is the initial release of Oracle JavaFX 21.

Supported Runtimes

JavaFX 21 is designed to work with both JDK 21 and JDK 17.

Supported Platforms

JavaFX 21 is available for Linux x86_64, Windows x86_64, macOS AArch64, and macOS x86_64.

Known Issues

  • javafx/media

    • Media Playback Does Not Work on Ubuntu 26.04 (JDK-8382470)

      Media playback does not work on Ubuntu 26.04. This affects most media formats such as MP4 with H.264/H.265, MP3, AAC, and HTTP Live Streaming. This is because JavaFX Media does not support libavcodec version 62. Support for libavcodec version 62 will be added with JDK-8378510. As a workaround, install libavcodec version 61 compiled with support for at least the following:

      • decoder: aac, mp3, mp3float, h264, hevc
      • parser: aac, h264, hevc
      • demuxer: aac, h264, hevc, mpegts, mpegtsraw

List of Fixes

# Link Area Summary
1 JDK-8380557 javafx/web Additional WebKit 623.1 fixes from WebKitGTK 2.50.6
2 JDK-8377930 javafx/web Additional WebKit 623.1 fixes from WebKitGTK 2.50.5
3 JDK-8377099 javafx/web Additional WebKit 623.1 fixes from WebKitGTK 2.50.4
4 JDK-8373058 javafx/media Media crash when playing MP3 over JRT protocol on macOS 26
5 JDK-8371052 javafx/media Update libFFI to 3.5.2
6 JDK-8368572 javafx/web Update WebKit to 623.1
7 JDK-8348744 javafx/window-toolkit Application window not always activated on macOS 15
8 JDK-8322795 javafx/graphics CSS performance regression up to 10x
9 JDK-8284544 javafx/accessibility [Win] Name-Property of Spinner cannot be changed

OpenJFX 21: Earlier Update Release Versions

These release notes refer to fixes for earlier OpenJFX 21 update releases for which there is no equivalent Oracle JDK version.

List of Fixes

# Link Area Summary
1 JDK-8370632 javafx/web Additional libxslt 1.1.43 fixes
2 JDK-8368691 javafx/web Update libxml2 to 2.14.6
3 JDK-8367578 javafx/web Additional WebKit 622.1 fixes from WebKitGTK 2.48.7
4 JDK-8366744 javafx/web Update SQLite to 3.50.4
5 JDK-8366217 javafx/media Update GStreamer to 1.26.5
6 JDK-8363813 javafx/window-toolkit Missing null check in GlassScreen
7 JDK-8361648 javafx/media Update Glib to 2.84.3
8 JDK-8361644 javafx/web Update ICU4C to 77.1
9 JDK-8360270 javafx/web Websocket communication issues with Vaadin applications through webview
10 JDK-8356982 javafx/web Update WebKit to 622.1
11 JDK-8354940 javafx/web Fail to sign in to Microsoft sites with WebView
12 JDK-8354876 javafx/web Update SQLite to 3.49.1
13 JDK-8352164 javafx/web Update libxslt to 1.1.43
14 JDK-8352162 javafx/web Update libxml2 to 2.13.8
15 JDK-8346229 javafx/media Update Glib to 2.82.4
16 JDK-8346228 javafx/media Update GStreamer to 1.24.10
17 JDK-8340322 javafx/web Update WebKit to 620.1
18 JDK-8340208 javafx/web Additional WebKit 619.1 fixes from WebKitGTK 2.44.4
19 JDK-8338701 javafx/media Provide media support for libavcodec version 61
20 JDK-8338478 javafx/graphics [macos] Crash in CoreText with certain strings using JDK 22 or later
21 JDK-8338307 javafx/web Additional WebKit 619.1 fixes from WebKitGTK 2.44.3
22 JDK-8338306 javafx/web WebView Drag and Drop fails with WebKit 619.1
23 JDK-8337481 javafx/web File API: file.name contains path instead of name
24 JDK-8336941 javafx/web Update libxslt to 1.1.42
25 JDK-8336938 javafx/media Update libFFI to 3.4.6
26 JDK-8336798 javafx/web DRT test cssrounding.html test for linear layout fails with WebKit 619.1
27 JDK-8334713 javafx/web WebKit build failed on LoongArch64 because currentStackPointer is undefined
28 JDK-8334124 javafx/web Rendering issues with CSS "text-shadow" in WebView
29 JDK-8332539 javafx/web Update libxml2 to 2.12.7
30 JDK-8331765 javafx/web Websocket callbacks are not executed after WebKit 617.1 update
31 JDK-8331748 javafx/web Update libxml2 to 2.12.6
32 JDK-8331603 javafx/graphics Cleanup native AbstractSurface methods getRGBImpl, setRGBImpl
33 JDK-8330462 javafx/accessibility StringIndexOutOfBoundException when typing anything into TextField
34 JDK-8329705 javafx/accessibility Add missing Application thread checks to platform specific a11y methods
35 JDK-8329011 javafx/web Update SQLite to 3.45.3
36 JDK-8328994 javafx/web Update WebKit to 619.1
37 JDK-8328684 javafx/web HellowWebView demo crashes when a webpage is scrolled
38 JDK-8327177 javafx/window-toolkit macOS: wrong GlobalRef deleted in GlassMenu
39 JDK-8326989 javafx/web Text selection issues on WebView after WebKit 617.1
40 JDK-8325258 javafx/web Additional WebKit 617.1 fixes from WebKitGTK 2.42.5
41 JDK-8324337 javafx/web Cherry-pick WebKit 617.1 stabilization fixes
42 JDK-8324326 javafx/web Update ICU4C to 74.2
43 JDK-8324233 javafx/graphics Update JPEG Image Decoding Software to 9f
44 JDK-8323880 javafx/web Caret rendered at wrong position in case of a click event on RTL text
45 JDK-8323879 javafx/web constructor Path(Path) which takes another Path object fail to draw on canvas html
46 JDK-8322703 javafx/web Intermittent crash in WebView in a JFXPanel from IME calls on macOS
47 JDK-8322251 javafx/graphics [Linux] JavaFX is not displaying CJK on Ubuntu 23.10 and later
48 JDK-8320267 javafx/web WebView crashes on macOS 11 with WebKit 616.1
49 JDK-8319669 javafx/window-toolkit [macos14] Running any JavaFX app prints Secure coding warning
50 JDK-8319079 javafx/graphics Missing range checks in decora
51 JDK-8319066 javafx/window-toolkit Application window not always activated in macOS 14 Sonoma
52 JDK-8318614 javafx/web Update WebKit to 617.1
53 JDK-8318388 javafx/web Update libxslt to 1.1.39
54 JDK-8318387 javafx/media Update GStreamer to 1.22.6
55 JDK-8318386 javafx/media Update Glib to 2.78.1
56 JDK-8317508 javafx/media Provide media support for libavcodec version 60
57 JDK-8317370 javafx/base JavaFX runtime version is wrong at runtime
58 JDK-8315958 javafx/window-toolkit Missing range checks in GlassPasteboard
59 JDK-8315657 javafx/window-toolkit Application window not activated in macOS 14 Sonoma
60 JDK-8315074 javafx/window-toolkit Possible null pointer access in native glass
61 JDK-8314212 javafx/web Crash when loading cnn.com in WebView
62 JDK-8313900 javafx/media Possible NULL pointer access in NativeAudioSpectrum and NativeVideoBuffer
63 JDK-8313856 javafx/graphics Replace VLA with malloc in pango
64 JDK-8313711 javafx/web Cherry-pick WebKit 616.1 stabilization fixes
65 JDK-8313648 javafx/graphics JavaFX application continues to show a black screen after graphic card driver crash
66 JDK-8313181 javafx/web Enabling modern media controls on webkit 616.1 does not load button images on HTML5 video Element
67 JDK-8313177 javafx/web Web Workers timeout with Webkit 616.1
68 JDK-8311492 javafx/graphics FontSmoothingType LCD produces wrong color when transparency is used
69 JDK-8311185 javafx/controls VirtualFlow jump when cellcount changes
70 JDK-8311097 javafx/web Synchron XMLHttpRequest not receiving data
71 JDK-8310681 javafx/web Update WebKit to 616.1
72 JDK-8309374 javafx/accessibility Accessibility Focus Rectangle on ListItem is not drawn when ListView is shown for first time
73 JDK-8307536 javafx/graphics FileAlreadyExistsException from NativeLibLoader when running concurrent applications with empty cache
74 JDK-8251240 javafx/window-toolkit Menus inaccessible on Linux with i3 wm
75 JDK-8221261 javafx/window-toolkit Deadlock on macOS in JFXPanel app when handling IME calls

OpenJFX 21

These release notes refer to the OpenJFX 21. There is no equivalent JavaFX 21.

Important Changes

  • javafx/base

    • Event Handler Methods Added to EventTarget Interface (JDK-8306021)

      Four new default methods were added to the javafx.event.EventTarget interface:

      • <E extends Event> void addEventHandler(EventType<E>, EventHandler<? super E>)
      • <E extends Event> void removeEventHandler(EventType<E>, EventHandler<? super E>)
      • <E extends Event> void addEventFilter(EventType<E>, EventHandler<? super E>)
      • <E extends Event> void removeEventFilter(EventType<E>, EventHandler<? super E>)

      This change allows applications to manage event handlers for all EventTarget implementations.

      Most applications will not run into any backward compatibility problems with this change.

      The change is fully binary compatible and, for most use cases, it is also source compatible. A compilation error will occur in one of the following two unlikely cases:

      • An application class extends Menu, MenuItem, TableColumnBase, or TreeItem and overrides addEventHandler or removeEventHandler.
      • An application class that is not a subclass of Node implements their own addEventHandler or removeEventHandler using a signature other than that of the newly added methods (for example, copying the same incorrect pattern that MenuItem used prior to this release).
  • javafx/build

    • JavaFX Requires macOS 11 or Later (JDK-8308114)

      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.

  • javafx/scenegraph

    • Return Type of javafx.css.Match::getPseudoClasses Changed (JDK-8304959)

      The return type of javafx.css.Match.getPseudoClasses has been changed to Set<PseudoClass> instead of a nonpublic type. Most applications will not be impacted by this change because this is not a method that applications ever need to call. In the unlikely event that an existing application binary does call this method, a NoSuchMethodError will be thrown. The solution is to recompile the application.

  • javafx/window-toolkit

    • JavaFX Requires GTK 3 on Linux (JDK-8299595)

      On Linux platforms, JavaFX 21 requires GTK3 version 3.8 or later. The JavaFX GTK2 library has been removed. An exception will be thrown when initializing the JavaFX runtime if the GTK 3 library cannot be loaded.

List of Enhancements

# Link Area Summary
1 JDK-8309470 javafx/controls Potential performance improvements in VirtualFlow
2 JDK-8307960 javafx/controls Create Table Column PopupMenu lazily
3 JDK-8307363 javafx/graphics TextFlow.underlineShape()
4 JDK-8307208 javafx/scenegraph Add GridPane constructor that accepts hGap and vGap values
5 JDK-8306648 javafx/other Update the JavaDocs to show the NEW section and DEPRECATED versions
6 JDK-8306021 javafx/base Add event handler management to EventTarget
7 JDK-8305885 javafx/base Use ReadOnly*PropertyBase class where possible
8 JDK-8304960 javafx/base ObservableListBase should defer constructing ListChangeBuilder
9 JDK-8304439 javafx/base Subscription based listeners
10 JDK-8302355 javafx/window-toolkit Public API for Toolkit.canStartNestedEventLoop()
11 JDK-8301312 javafx/accessibility Create implementation of NSAccessibilityButton protocol
12 JDK-8299756 javafx/other Minor updates in CSS Reference
13 JDK-8299595 javafx/window-toolkit Remove terminally deprecated JavaFX GTK 2 library
14 JDK-8290765 javafx/graphics Remove parent disabled/treeVisible listeners
15 JDK-8284542 javafx/accessibility [Accessibility] [Win] Missing attribute for toggle state of CheckBox in CheckBoxTreeItem
16 JDK-8283063 javafx/base Optimize Observable{List/Set/Map}Wrapper.retainAll/removeAll
17 JDK-8260528 javafx/window-toolkit Clean glass-gtk sizing and positioning code
18 JDK-8091419 javafx/controls TableView: invoke table menu button programmatically
19 JDK-8091153 javafx/controls Customize the Table Button Menu
20 JDK-8090647 javafx/controls Mnemonics : on windows we should cancel the underscore latch when an app loses focus.

List of Fixes

# Link Area Summary
1 JDK-8313227 javafx/graphics Correct attenuation indicator for removed lights
2 JDK-8311806 javafx/accessibility Class ButtonAccessibility is implemented twice
3 JDK-8311127 javafx/controls Regression: The fix for TableView and TreeTableView menu button affects all table column headers
4 JDK-8310638 javafx/controls Filtering a TableView with a large number of items freezes the UI
5 JDK-8309935 javafx/graphics Mac - SystemMenuBar, IndexOutOfBoundsException on change
6 JDK-8309508 javafx/graphics Possible memory leak in JPEG image loader
7 JDK-8308191 javafx/accessibility [macOS] VoiceOver decorations are shifted on second monitor
8 JDK-8308114 javafx/build Bump minimum version of macOS for x64 to 11.0 (matching aarch64)
9 JDK-8307538 javafx/controls Memory leak in TreeTableView when calling refresh
10 JDK-8306990 javafx/graphics The guarantees given by Region's floor and ceiling functions should work for larger values
11 JDK-8306708 javafx/graphics Region.layoutInArea uses incorrect snap scale value
12 JDK-8306447 javafx/controls Adding an element to a long existing list may cause the first visible element to jump
13 JDK-8306329 javafx/web Update ICU4C to 73.1
14 JDK-8306328 javafx/media Update libFFI to 3.4.4
15 JDK-8306121 javafx/window-toolkit Scene not rendered initially when changing scenes after fix for JDK-8296621
16 JDK-8306115 javafx/web Update libxml2 to 2.10.4
17 JDK-8305248 javafx/controls TableView not rendered correctly after column is made visible if fixed cell size is set
18 JDK-8304959 javafx/scenegraph Public API in javafx.css.Match should not return private API class PseudoClassState
19 JDK-8304933 javafx/scenegraph BitSet (used for CSS pseudo class states) listener management is incorrect
20 JDK-8304831 javafx/graphics TextFlow.hitTest.insertionIndex incorrect with surrogate pairs
21 JDK-8304441 javafx/window-toolkit [macos] Crash when putting invalid unicode char on clipboard
22 JDK-8304290 javafx/media Some JNI calls made without checking exceptions in media
23 JDK-8303897 javafx/base ObservableValue's when binding should only invalidate when strictly needed
24 JDK-8303740 javafx/base JavaFX - Leak in Logging, Logging remembers last exception
25 JDK-8303680 javafx/controls Virtual Flow freezes after calling scrollTo and scrollPixels in succession
26 JDK-8303217 javafx/web Webview loaded webpage is not showing play, volume related buttons for embeded Audio/Video elements
27 JDK-8303026 javafx/controls [TextField] IOOBE on setting text with control characters that replaces existing text
28 JDK-8302797 javafx/graphics ArrayIndexOutOfBoundsException in TextRun.getWrapIndex()
29 JDK-8302684 javafx/web Cherry-pick WebKit 615.1 stabilization fixes (2)
30 JDK-8302511 javafx/graphics HitInfo.toString() throws IllegalArgumentException
31 JDK-8302294 javafx/web Cherry-pick WebKit 615.1 stabilization fixes
32 JDK-8301763 javafx/scenegraph Adding children to wrong index leaves inconsistent state in Parent#childrenSet
33 JDK-8301712 javafx/web [linux] Crash on exit from WebKit 615.1
34 JDK-8301022 javafx/web Video distortion is observed while playing youtube video
35 JDK-8301009 javafx/web Update libxml2 to 2.10.3
36 JDK-8300954 javafx/web HTML default Range input control not rendered
37 JDK-8300893 javafx/controls Wrong state after deselecting two or more cells of a TableView selection
38 JDK-8300872 javafx/graphics WebView's ColorChooser fails to initialize when running in security context
39 JDK-8299986 javafx/controls Wrong sublist used in ListChangeListener
40 JDK-8299977 javafx/web Update WebKit to 615.1
41 JDK-8299968 javafx/graphics Second call to Stage.setScene() create sizing issue with uiScale > 1.0
42 JDK-8299348 javafx/window-toolkit Size-restricted window can be observed with incorrect dimensions
43 JDK-8298382 javafx/accessibility JavaFX ChartArea Accessibility Reader
44 JDK-8295078 javafx/graphics TextField blurry when inside an TitledPane -> AnchorPane
45 JDK-8293836 javafx/controls Rendering performance degradation at bottom of TableView with many rows
46 JDK-8290866 javafx/graphics Apple Color Emoji turns gray after JavaFX version 18
47 JDK-8290092 javafx/graphics Temporary files are kept when call Clipboard.getSystemClipboard().getImage()
48 JDK-8284662 javafx/accessibility [Win][Accessibility][ListCell] Screen reader fails to read ListView/ComboBox item count if > 100
49 JDK-8283551 javafx/controls ControlAcceleratorSupport menu items listener causes memory leak
50 JDK-8281327 javafx/graphics JavaFX does not support fonts installed per-user on Windows 10/11
51 JDK-8278938 javafx/window-toolkit [Win] Robot can target wrong key for punctuation and symbols
52 JDK-8275033 javafx/window-toolkit Drag and drop a file produces NullPointerException Cannot read field "dragboard"
53 JDK-8251862 javafx/graphics Wrong position of Popup windows at the intersection of 2 screens
54 JDK-8246104 javafx/graphics Some complex text doesn't render correctly on macOS
55 JDK-8245919 javafx/controls Region#padding property rendering error
56 JDK-8242419 javafx/swing JFXPanel: MouseEvent always reports that Primary button changed state if held
57 JDK-8237505 javafx/controls RadioMenuItem in ToggleGroup: deselected on accelerator
58 JDK-8233955 javafx/graphics VM crashes if more than one file are added to ClipboardContent via drag and drop
59 JDK-8231865 javafx/swing JFXPanel sends resize event with size 0x0 on HiDPI devices
60 JDK-8230833 javafx/controls LabeledSkinBase computes wrong height with ContentDisplay.GRAPHIC_ONLY
61 JDK-8224260 javafx/base ChangeListener not triggered when adding a new listener in invalidated method
62 JDK-8194704 javafx/scenegraph Text/TextFlow hitTest() javadoc
63 JDK-8178368 javafx/controls Right alignment of text fields and alignment of prompt text works incorrectly
64 JDK-8173321 javafx/controls TableView: Click on right trough has no effect when cell height is higher than viewport height
65 JDK-8172849 javafx/controls Non-intuitive baseline alignment for labeled controls with graphics
66 JDK-8154038 javafx/controls Spinner's converter should update its editor
67 JDK-8150709 javafx/window-toolkit Mac OSX and German Keyboard Layout (Y/Z)
68 JDK-8138842 javafx/controls TableViewSelectionModel.selectIndices does not select index 0
69 JDK-8137244 javafx/controls Empty Tree/TableView with CONSTRAINED_RESIZE_POLICY is not properly resized
70 JDK-8090123 javafx/controls Items are no longer visible when collection is changed
71 JDK-8088998 javafx/controls XYChart: duplicate child added exception when remove & add a series in several charts
72 JDK-8088594 javafx/controls NullPointerException on showing submenu of a contextmenu