JavaFX 2

Don’t ask what the world needs. Ask what makes you come alive, and go do it. Because what the world needs is people who have come alive. —Howard Thurman At the annual JavaOne conference in May 2007, Sun Microsystems announced a new product family named JavaFX. Its stated purpose includes enabling the development and deployment […]

A Brief History of JavaFX (Getting a Jump Start in JavaFX)

JavaFX started life as the brainchild of Chris Oliver when he worked for a company named SeeBeyond. They had the need for richer user interfaces, so Chris created a language that he dubbed F3 (Form Follows Function) for that purpose. In the article, "Mind-Bendingly Cool Innovation" (cited in the Resources section at the end of […]

Going to the Source: Oracle’s JavaFX Web Site (Getting a Jump Start in JavaFX)

Oracle’s site is a great resource for seeing example JavaFX programs, downloading the JavaFX SDK and tools, taking tutorials on JavaFX, and linking to other resources. See Figure 1 -2 for a screenshot of this web site. Figure 1-2. Oracle’s official JavaFX web site In addition, blogs maintained by JavaFX engineers and developers are […]

Accessing the JavaFX SDK API (Getting a Jump Start in JavaFX)

A useful resource available from the JavaFX sites is the SDK API JavaDoc documentation, shown in Figure 1-3.         Figure 1 -3. JavaFX SDK API Javadoc The API documentation in Figure 1-3, for example, shows how to use the Rectangle class, located in the javafx.scene.shape package. Scrolling down this web page shows […]

Obtaining the JavaFX SDK (Getting a Jump Start in JavaFX)

You can get the JavaFX SDK from Oracles’s JavaFX web site mentioned earlier. Currently you have the choice of downloading the JavaFX SDK, the JavaFX Runtime, and the JavaFX Plugin for NetBeans IDE. To develop JavaFX applications you’ll need the JavaFX SDK. In addition, we recommend that you download the JavaFX Plugin for NetBeans IDE […]

Other Available Tools (Getting a Jump Start in JavaFX)

There are other tools available for developing JavaFX applications. For example, there is a JavaFX plug-in being developed by Tom Schindl for the Eclipse IDE, but at the time of this writing it isn’t as mature as the NetBeans plugin. The URL for the Eclipse plugin is listed in the Resources section. Now that you […]

Developing Your First JavaFX Program: "Hello Earthrise" (Getting a Jump Start in JavaFX)

On Christmas Eve in 1968 the crew of Apollo 8 entered lunar orbit for the first time in history. They were the first humans to witness an "Earthrise," taking the magnificent picture shown in Figure 1-4. Figure 1-4. The Hello Earthrise program In addition to demonstrating how to dynamically load images over the Internet, this […]

Compiling and Running from the Command-Line (Getting a Jump Start in JavaFX)

We usually use an IDE to build and run JavaFX programs, but to take all of the mystery out of the process we use the command-line tools first. ■ Note For this exercise, as with most others in the topic, you need the source code. If you prefer not to type the source code into […]

Understanding the Hello Earthrise Program (Getting a Jump Start in JavaFX) Part 1

Now that you’ve run the application, let’s walk through the program listing together. The code for the Hello Earthrise application is shown in Listing 1-1. Listing 1-1. The Program                 Now that you’ve seen the code, let’s take a look at its constructs and concepts in detail. […]

Understanding the Hello Earthrise Program (Getting a Jump Start in JavaFX) Part 2

Drawing Text In the previous snippet, notice that several variables are available in the Text class. This particular example is a little more complicated than the normal use of the Text class. Let’s first look at a typical case, shown in the following snippet, in which you simply want to draw a string of text […]