JavaFX 2.2 Release Notes

The JavaFX 2.2 release includes the JavaFX Software Development Kit (SDK) for the Windows, Linux, and Mac OS X platforms. The JavaFX SDK provides the tools and technologies for developing JavaFX applications. This release also includes the JavaFX Runtime for the Windows and Linux platforms.

In addition to a number of bug fixes, this release includes the following new features:

  • Media H.264 and AAC support

  • Linux support (including plugin and webstart)

  • Canvas

  • New controls: Color Picker, Pagination

  • HTTP Live Streaming support

  • Touch events and gestures

  • Image manipulation API

Note that a standalone JavaFX SDK and JavaFX Runtime for earlier JavaSE versions is available only for the Windows and Linux platforms. The JavaFX SDK is installed with Java SE 7 update 6 for all the supported platforms. The JavaFX Runtime is installed with the JRE for the Windows and Linux platforms.

System Requirements

See the JavaFX System Requirements document for information on the hardware and software prerequisites.

Getting Started

To get started with the JavaFX SDK, review the documentation provided at Good starting points include:


Sample JavaFX applications are available at Download the zip file that contains the samples for your operating system and extract the files to a directory of your choice. After extracting the files, the samples are in the javafx-samples-version directory, where version is the version of JavaFX with which the samples were built.

Read the javafx-samples-version/samples_readme.txt file for information on running the samples.

Source code for each sample is in the javafx-samples-version\src directory. To view the source code, go to the javafx-samples-version\src\sample directory, where sample is the name of the application in which you are interested. Each of the sample source directories is a NetBeans project. Follow the steps in Setting Up NetBeans IDE with JavaFX to create a JavaFX-enabled platform in NetBeans IDE.

Supported Locales

The java.lang, java.util, and java.text packages from the Java Platform Standard Edition (Java SE) JDK are available to JavaFX applications that are interested in supporting languages other than English. For information on the locale support that these packages provide, see JDK 7 and JRE 7 Supported Locales.

Bidirectional and complex writing systems are not supported for JavaFX applications in this release.

The JavaFX Runtime environment is translated into the same languages as the Java SE Runtime Environment. See the "User Interface Translation" section of the JDK 7 and JRE 7 Supported Locales page for the list of languages and the scope of the translation.

The JavaFX SDK is translated into Japanese (locale code ja) and Simplified Chinese (locale code zh_CN).

Known Bugs and Issues

The following sections describe known issues with the code. Bugs are arranged by component.

The number for each issue refers to reports in the JavaFX issues dashboard in JIRA. You must be a registered JIRA user to access the reports. To see a report or the complete list of open issues, log in to the JIRA project for JavaFX at

App Model

  • Issue: RT-13739 Attempt to display error dialog to Mac OS X users fails.

    Description: After setting Mac to Headless mode, an attempt to display a dialog fails.

    Workaround: None.


  • Issue: RT-19435 PopupControl not styled by Parent's stylesheet rules nor inlined inherited declarations.

    Description: The styles in stylesheets added to a Control through the stylesheets property of Parent are not applied to a PopupControl that is shown from that Control. This is also true of inline styles set on the Control. This affects ContextMenu and Tooltip.

    Workaround: None.

  • Issue: RT-20295 Error loading JPG image when scaling.

    Description: A JPEG image will sometimes fail to load if the image is scaled with a non-zero width or height in the Image constructor.

    Workaround: Construct the Image with the actual size of the JPEG image (by using the default width and height of 0), and instead scale the ImageView by using the fitWidth and fitHeight properties. For example, to load a JPEG image and scale it to 300x300 you could use:
    Image im = new Image(jpegURL);
    ImageView iv = new ImageView(im);

  • Issue: RT-23631 Mac: pop-ups/context menus have incorrect position at startup when using Doctype declaration in the HTML page.

    Description: JavaFX applets that are run using JavaFX 2.2 and JDK 7 update 6 on Mac OS X may have popup menus and selection lists incorrectly placed on the screen if the containing HTML page specifies a doctype attribute.

    Workaround: Remove the doctype attribute to correct the problem.


  • Issue: RT-17931 JavaFX doesn't run in Chrome.

    Description: When using the Chrome browser on Windows to run a JavaFX application, you might see the following information bar:
    "The Java plug-in needs your permission to run".

    Workaround: Click on "Always run on this site", and then reload the page in the browser. The JavaFX application should start to load.


  • Issue: RT-20141 Support rotating and zooming inertia on Windows

    Description: Windows supports rotating and zooming inertia, but Glass currently does not implement this functionality.

    Workaround: None.

  • Issue: RT-23113 Gtk: When running in a browser, if preloader stage is shown the application shows a gray screen.

    Description: Gtk: on Linux, sometimes, applet area only shows a gray rectangle.

    Workaround: None.

  • Issue: RT-23449 Mac: javafx.stage.FileChooser().setInitialDirectory(file) not working.

    Description: On Mac it is impossible to specify an initial directory for a FileChooser. The dialog always opens with a folder determined by the platform.

    Workaround: None.


  • Issue: RT-5431 Mouse events should not be delivered to non-visible components.

    Description: Currently picking does not take into account the front clipping plane of the view frustum in culling picked node. This can result in returning the wrong picked node if a 3D transformed node exists between the viewer and the front clipping plane.

    Workaround: None.

  • Issue: RT-14413 JFXPanel does not work in full-screen mode.

    Description: AWT full-screen exclusive mode prevents initialization of the JavaFX D3D pipeline.

    Workaround: Construct a JFXPanel object before entering full-screen mode from any Swing JWindow.

  • Issue: RT-15117 Clipping does not work for objects in 3D

    Description: Objects to which a 3D transform is applied are not clipped correctly. This is a known perspective rendering bug for nVidia and AMD (ATI) GPUs.

    Workaround: None.

  • Issue: RT-16397 Region: asymmetric clipping in an image border that repeats.

    Description: Clipping in an image border is incorrect because the behavior of a Region object does not comply with the CSS spec. The Region object begins the image slice at the left of the image, however the CSS spec starts the image slice at the center of the image.

    Workaround: None.

  • Issue: RT-16398 Region: distortion in an image border that repeats. Repeated images have the wrong width-to-height ratio.

    Description: When the values defined for the -fx-border-image-slice and -fx-border-image-width properties do not match, the image is scaled to fit. However, the image is scaled disproportionately.

    Workaround: Size the image so that -fx-border-image-slice and -fx-border-image-width have the same value, so the image does not need to be scaled.

  • Issue: RT-18254 Stage Icons don't load on Mac OS X.

    Description: When stage.getIcons().addAll(icon) is used to load an icon for an application on Mac OS X, the icon fails to load and the application uses the standard Java icon instead.

    Workaround: To set the icon for an application on Mac OS X, follow the instructions in the Bundle Programming Guide in the Mac OS X Developer Library.

  • Issue: RT-22843 Canvas when shrunk and grown has old dirty data.

    Description: A resizable canvas when shrunk and then grown again later, uses the same texture but after it is grown, the new area still contains old drawing data from before it was shrunk.

    Workaround: Clear the buffer when the size changes.

  • Issue: RT-23549 Mac OS regression: Menu.disable property may be ignored.

    Description: The disable property of the menu item in the setOnMenuValidation handler of its parent menu might not work when using system menu bar on Mac OS and if the menu contains sub menu items.

    Workaround: The following workaround was tested in SceneBuilder and might not work in other environments.
    Instead of using subMenu.setDisable(true); try the following:
    if (subMenu.getOnMenuValidation() != null) {


  • Issue: RT-5238 Negative rate playback is not supported.

    Description: Playing back media in reverse (negative rate) is not yet supported.

    Workaround: None.

  • Issue: RT-9100 FLV and MP3 playback crash Java if the platform does not support the SSE2 instruction set.

    Description: The Java virtual machine could crash if the machine being used to play media does not support the SSE2 instruction set.

    Workaround: Make sure that the machine being used meets the JavaFX system requirements.

  • Issue: RT-17533 Mac MP3 decoder does not play short audio clips.

    Description: MP3 sources must contain at least three frames to be playable on Mac OS X.

    Workaround: Convert the MP3 clip to uncompressed (PCM) AIFF or WAV format, which are the preferred formats for short audio clips.

  • Issue: RT-18520 Linux AAC decoding does not handle 5.1 audio channel layout.

    Description: Multichannel AAC encodings such as 5.1 are currently not supported on Linux.

    Workaround: None.

  • Issue: RT-19712 MediaPlayer silently fails to play MP4 via http.

    Description: MPEG-4 files which are not properly prepared for streaming might have to be completely downloaded before playback can begin.

    Workaround: Put headers for MP4 files at the end of the file. Otherwise, wait for the entire file to be downloaded.

  • Issue: RT-22547 JFXMedia: OSXPlatform does not support audio spectrum or equalizer.

    Description: For HTTP Live Streaming or if H.264 video playback falls back to the OSXPlatform code path, the audio equalizer and spectrum capabilities are not available.

    Workaround: None.

  • Issue: RT-23343 Mac OS X: startTime or stopTime are not supported for HTTP Live Streaming.

    Description: The start and stop time properties are not supported for HTTP Live Streaming sources on Mac OS X.

    Workaround: None.

  • Issue: RT-23344 Mac OS X: Audio balance is not supported for HTTP Live Streams and in some cases MP4 files.

    Description: For HTTP Live Streaming or for H.264 video playback which falls back to the OSXPlatform code path, the audio balance setting is non-functional.

    Workaround: None.

  • Issue: RT-23629 MediaPlayer seek + setRate combination doesn't work reliable.

    Description: Calling seek() and setRate() in succession on MediaPlayer might not work as expected.

    Workaround: Calling setRate() first followed by seek() gives better reliability.


  • Issue: RT-21325 Video cannot be loaded through VPN.

    Description: Video files cannot be played through VPN on a computer running Windows 7 64-bit, JDK7 32 bit, and JavaFX 32-bit. JDK7 uses IPv6 stack by default, which might cause trouble with playing video through VPN.

    Workaround: Use IPv4 by setting the VM option as follows:


  • Issue: RT-23265 Snapshot does not work with (invisible) WebView nodes.

    Description: Snapshot only works when pressing on (uncommented) snapshot button. In this case the WebView was rendered on screen before, otherwise the png only shows the test-label.

    Workaround: When taking a snapshot of a scene that contains a WebView node, wait for at least 2 frames before issuing the snapshot command. This can be done by using a counter in an AnimationTimer to skip 2 pulses and take the snapshot on the 3rd pulse.