Friday Feb 07, 2014

Restructured Deployment Information

The deployment guide for Rich Internet Applications (RIAs) has been reorganized and relevant information from the obsolete pre-6u10 deployment and plugin guides has been updated and included. The obsolete guides have been removed from the JDK 7 documentation set and replaced with pages that direct you to the Java Rich Internet Applications Guide.

Due to the reorganization, the URL for some pages has changed. If you get a Page Not Found error, please use the Table of Contents for the Java Rich Internet Applications Guide to locate the page.

The pre-6u10 Deployment Guide and Plug-in Guide are available in the JDK 6 documentation set.

Friday Sep 20, 2013

JavaFX 8 Developer Preview Documents Released!

JavaFX Documentation

JavaFX 8 Developer Preview Documents were published today on They comprise Getting Started with JavaFX 3D Graphics, Adding HTML Content to JavaFX Applications, and Embedding Swing Content in JavaFX Applications.

3D Graphics

A new document, Getting Started with JavaFX 3D Graphics, introduces the 3D graphics features that are included in the upcoming JavaFX 8 APIs. The features include 3D shapes, camera, lights, subscene, materials, and picking. The document also steps you through the creation of a simple 3D sample application, MoleculeSampleApp, that uses some of the 3D features discussed in the document.


The JavaFX WebView tutorial was extended to highlight the new features and improvements in the JavaFX 8 Web component. Review Supported Features of HTML5 for more information about additional HTML5 features including Web Sockets, Web Workers, and Web Fonts. Make the most of your WebView based applications with the new printing capabilities covered in Printing HTML Content.

Embedding Swing Content

The ability to embed JavaFX content in Swing applications has existed since the JavaFX 2.0 release. This tutorial introduces the SwingNode class available in the JavaFX 8 APIs that provides reverse integration. A new document describes how to embed Swing components in JavaFX applications and provides working applications that illustrate Swing buttons with HTML content embedded in a JavaFX application and interoperability between Swing and JavaFX buttons.

Tuesday Sep 10, 2013

JavaFX 2.2.40 Documentation Introduces the New Deployment Features

The JavaFX Deployment Guide was updated for the JavaFX 2.2.40 release to describe the new User JVM Arguments in the Ant tasks. Now you can create applications that allow users to override jvm options. For example, users can change the heap size for the application.

A new <fx:jvmuserarg> attribute has been added to <fx:platform>. This new attribute explicitly defines an attribute that can be overridden by users. For instance:

        <fx:jvmuserarg name="-Xmx" value="768m" />

For this specific case, -Xmx768m is passed as a default value for the heap size. The user can override this value in a user configuration file (on Linux and Mac) or in the registry in Windows.

For more information see the Deploying JavaFX Applications guide.

Thursday Jul 18, 2013

Learn Java Over The Summer

Hello Students! Hope you are enjoying your summer vacation! Summer trips are done, and I bet you've asked your parents the question they dread most - "I am bored. What do I do now?" :-)

If you are looking for ways to get the brain's juices flowing or just getting a head start on a high school AP computer science course, Java Tutorials are a great resource!

The following learning paths are perfect for students in middle school or high school.

Get set, go!

See the trails mentioned next for information about installing an IDE, learning the basics, and writing code with the help of code examples.

  • Getting Started – An introduction to Java technology and lessons on installing Java development software and using it to create a simple program.
  • Learning the Java Language – Lessons describing essential concepts such as classes, objects, inheritance, datatypes, conditions, loops, control flow, and more. You can skip over the generics lesson at the beginning and come back to it later after you feel comfortable with the language.
  • Essential Java Classes – Lessons on exceptions, basic input/output, concurrency, regular expressions, and the platform environment.

I am a visual person!

Check out JavaFX and SceneBuilder documentation to learn about developing animations and cool new apps!

I love it! What's next?

See the Java Tutorials Learning Paths page to learn more!

Good luck!

- Sowmya

Wednesday Mar 06, 2013

Java Tutorials Fifth Edition Book

The JDK documentation team is happy to announce that The Java® Tutorial, Fifth Edition book is now available on Amazon in printed book and kindle formats. The fifth edition is based on JDK 7 and contains tutorials and code samples for the following features and more:
  • New file I/O API (NIO.2) and migrating legacy code to the new API
  • Fork Join pool
  • Project Coin: try-with-resources statement, binary literals, diamond syntax
  • Updates to Generics tutorial
  • Expanded deployment coverage (applets, java web start applications)
  • Preparing for Java Programming Language Certification - A mapping of Java certification objectives to sections of the Java Tutorials.

- Sowmya

Thursday Dec 13, 2012

JavaFX 2.2.4 Documentation

JavaFX 2.2.4 and JDK 7u10 were released on Tuesday. In addition to the release documentation, the following new information is provided:

  • A new document, Using the Image Ops API, describes how to read and write raw pixel data to and from JavaFX images.
  • The Handling JavaFX Events document has been updated with more information on touch events. The Working with Touch Events chapter and Touch Events sample provide information about handling individual touch points to provide sophisticated responses to touch actions.
  • The Implementing Best Practices document has been updated to include information about running tasks on background threads.
  • The Troubleshooting section of Deploying JavaFX Applications now includes a section about disabling the automatic proxy configuration in your application code.

Other documents were updated to reflect minor bug fixes.

You can download JavaFX 2.2.4 from OTN. For all tutorials and API documentation, see

Friday Aug 24, 2012

Take a snapshot with JavaFX!

JavaFX 2.2 has a "snapshot" feature that enables you to take a picture of any node or scene. Take a look at the API Documentation and you will find new snapshot methods in the javafx.scene.Scene class.

The most basic version has the following signature:

public WritableImage snapshot(WritableImage image)

The WritableImage class (also introduced in JavaFX 2.2) lives in the javafx.scene.image package, and represents a custom graphical image that is constructed from pixels supplied by the application.

In fact, there are 5 new classes in javafx.scene.image:

  • PixelFormat: Defines the layout of data for a pixel of a given format.
  • WritablePixelFormat: Represents a pixel format that can store full colors and so can be used as a destination format to write pixel data from an arbitrary image.
  • PixelReader: Defines methods for retrieving the pixel data from an Image or other surface containing pixels.
  • PixelWriter: Defines methods for writing the pixel data of a WritableImage or other surface containing writable pixels.
  • WritableImage: Represents a custom graphical image that is constructed from pixels supplied by the application, and possibly from PixelReader objects from any number of sources, including images read from a file or URL.

The API documentation contains lots of information, so go investigate and have fun with these useful new classes!

-- Scott Hommel

Tuesday Jun 19, 2012

JavaFX 2.1.1 Documentation

JavaFX 2.1.1 released on June 12, and few documents were updated on the website.

Besides a new set of release documentation, the Concurrency in JavaFX article was updated with a discussion of how to cancel a task, with a code sample to illustrate that. A new section describes the WorkerStateEvent class and how to use the convenience methods such as cancelled, failed, running, scheduled, and succeeded, which are invoked when the Worker implementation state changes.

Other documents were updated to reflect minor bug fixes, many of them contributed by JavaFX readers using the feedback alias in the sidebar of all of our documentation. Yes, we do respond and pay attention to what you say and at least try to point you in the right direction if we can't solve a problem you're having with a tutorial. We appreciate your feedback!

Friday Nov 18, 2011

JavaFX: Use a Screen with your Scene!

Here's a handy tip for sizing your application. You can use the javafx.stage.Screen class to obtain the width and height of the user's screen, and then use those same dimensions when sizing your scene. The following code modifies default "Hello World" application that appears when you create a new JavaFX project in NetBeans.

package screendemo;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import javafx.stage.Screen;
import javafx.geometry.Rectangle2D;

public class ScreenDemo extends Application {

    public static void main(String[] args) {
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World");
        Group root = new Group();
        Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds();
        Scene scene = new Scene(root, screenBounds.getWidth(), screenBounds.getHeight());   
        Button btn = new Button();
        btn.setText("Hello World");
        btn.setOnAction(new EventHandler() {

            public void handle(ActionEvent event) {
                System.out.println("Hello World");

Running this program will set the Stage boundaries to visible bounds of the main screen.

-- Scott Hommel

Thursday Oct 27, 2011

Share Your Ideas!

JavaFX 2.0 Documentation

Thanks to our JavaFX readers who have submitted feedback on the documentation. Our latest release of the JavaFX documentation includes improvements and fixes suggested by our readers. For example, we added a deployment section to the Getting Started tutorial and put more diagrams in the Deployment document.

You can send us feedback from any JavaFX document.  Look for the section titled "We Welcome Your Feedback" in the document right nav bar, as shown in the following figure.

User Feedback Section

Share your ideas on what, from your perspective, needs to be documented.
Which essential concepts are not covered yet?

Help us to help you!

Monday Oct 03, 2011

JavaFX 2.0 Released!

JavaFX 2.0, a major update to JavaFX, has been designed from the ground-up to be the next generation UI platform for Java developers. It provides a powerful and expressive Java-based UI platform capable of handling large-scale data-driven business applications.

It offers developers an easy to learn UI platform to create rich Internet applications and content for desktops and web browsers. Starting with this version, developers can create JavaFX applications completely in the Java programming language using standard Java development tools, while leveraging their existing investments and knowledge in the Java platform.

JavaFX 2.0 includes a rich set of UI controls, graphics and media features to simplify development of immersive visual applications. A new feature introduced in JavaFX 2.0 is the WebView component that allows embedding web content in JavaFX applications. In addition, JavaFX allows developing user interfaces in FXML – a scriptable, XML-based markup language for defining user interfaces. Developers familiar with web technologies or other markup based UI technologies will find FXML easy to learn and powerful for a variety of applications.

The documentation set for JavaFX 2.0 contains over 30 new and updated documents, including new coverage of Drag-and-Drop and the JavaFX Collections API. It also includes a redesigned index page with a new learning trail, and a customized feedback box on each doc. The documentation set is arranged into the following categories: Getting Started; User Interface; Effects, Animation, and Media; Application Logic; Reference; Deployment and More.

JavaFX 2.0 is now available for download from For detailed tutorials and API documentation, see

Wednesday Nov 25, 2009

Java Applets Quiz

Do you enjoy quizzes? Take a minute to answer this quiz about Java applets.[Read More]

Tuesday Nov 24, 2009

Getting Applets To Talk To Each Other

Do you have more than one applet on a web page? Do you want the applets to share water cooler gossip? Ahem..ahem.. On a more serious note, do you want one applet to invoke methods or set variables of another applet? [Read More]

Tuesday Nov 17, 2009

Reader Poll: Who Wants Screencasts?

Hi everyone,

We're running a reader poll over on the JavaFX blog. We'd like to know your thoughts on screencasting vs. written tutorials. Please take a minute to visit that page and leave a comment. We greatly value your opinion!

- Scott Hommel

Wednesday Sep 09, 2009

Follow Scott on Twitter!

Hey everyone, this is Scott Hommel. I've been a member of the docs team here at Sun for the past decade, working on both the JDK docs and the Java Tutorial. Since '07 I've been assigned exclusively to JavaFX ( I've set up a twitter account at so if you've ever been curious about the day-to-day workings of a technical writer, sign up to "follow" what I'm working on. It'll give you the inside scoop on what docs are coming out next. With enough followers, perhaps other writers will start "tweeting" as well.

-- Scott Hommel


Blog about Java technology documentation and news about Java releases.


« April 2015