Book Image

Mastering JavaFX 10

By : Sergey Grinev
5 (1)
Book Image

Mastering JavaFX 10

5 (1)
By: Sergey Grinev

Overview of this book

: JavaFX 10 is used to create media-rich client applications. This book takes you on a journey to use JavaFX 10 to build applications that display information in a high-performance, modern user interface featuring audio, video, graphics, and animation. Mastering JavaFX 10 begins by introducing you to the JavaFX API. You will understand the steps involved in setting up your development environment and build the necessary dependencies. This is followed by exploring how to work with the assets, modules, and APIs of JavaFX. This book is filled with practical examples to guide you through the major features of JavaFX 10. In addition to this, you will acquire a practical understanding of JavaFX custom animations, merging different application layers smoothly, and creating a user-friendly GUI with ease. By the end of the book, you will be able to create a complete, feature-rich Java graphical application using JavaFX.
Table of Contents (15 chapters)

To get the most out of this book

I hope you agree that we really need to write actual code to study programming. This book is built around code samples. Every section in the book is accompanied by a corresponding code sample and, if applicable, screenshots.

Before starting to read this book, I strongly encourage you to get a Git and download the accompanying GitHub repository, which you can find at https://github.com/sgrinev/mastering-javafx-9-10-book.

There are about 130 code samples, grouped by chapters numbers. For your convenience, each chapter is a NetBeans project, but almost every code sample is self-sufficient and can be run separately without the help of an IDE. If you opt for the latter approach, you can find the guidelines for running JavaFX apps from the command line in Chapter 11, Packaging with Java9 Jigsaw.

At the time of writing, you need the latest in-development version of Netbeans to work with Java 9 and 10. You can find it at http://bits.netbeans.org/download/trunk/nightly/latest/.

While you can get a good grasp of the topics described by just reading the book and looking at the screenshots, toying with the code samples and seeing the results of your changes will give you a much better understanding of JavaFX APIs.

Also, although the book has been released once and for all, I plan to update and fix these samples if any issues are found later on. Refer to GitHub's README.md for a history of changes.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-JavaFX-10. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You can import one CSS from another using the @import keyword."

A block of code is set as follows:

public static void main(String[] args) {
// you custom code
Application.launch(MyApplication.class, args);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

@DefaultProperty("children")
public class Pane
extends Region

Any command-line input or output is written as follows:

> javac FXApplication.java
> java FXApplication

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "For example, we see that the area under the mouse cursor is a DIV, as shown in the following screenshot."

Warnings or important notes appear like this.
Tips and tricks appear like this.