Introducing JavaFX 8 Programming

Book description

Develop cross-platform, feature-rich JavaFX GUI applications with expert instruction from Java guru Herb Schildt

Introducing JavaFX 8 Programming provides a fast-paced introduction to JavaFX, Java’s next-generation GUI programming tool

In this easy-to-read guide from Oracle Press, Java guru Herb Schildt presents the key topics and concepts that all Java developers will need to begin developing modern, dynamic JavaFX GUI applications. Of course, it’s written in the cohesive, yet concise format that has made Schildt an international best-selling programming author. Designed expressly for Java programmers, the book’s focus is on the new JavaFX API. As a result, all examples are written entirely in Java. The book begins with the fundamentals, including the general form of a JavaFX program. Readers then advance to event handling, controls, images, fonts, layers, effects, transforms, animation s (including 3D animations), menus, and more. Numerous complete examples are included that put key topics and techniques into action.

  • Presents a cohesive, fast-paced overview of key facets of JavaFX 8 programming
  • Sample code used in the text is available for download from the McGraw-Hill/Oracle Press Web site
  • Written in Herb Schildt’s clear, crisp, uncompromising style that has made him the choice of millions worldwide

Table of contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Preface
  6. 1 JavaFX Fundamentals
    1. A Brief History of Java’s GUI Frameworks
      1. The AWT: Java’s First GUI Framework
      2. Swing
      3. JavaFX
    2. JavaFX Basic Concepts
      1. The JavaFX Packages
      2. Setting the Stage with the Stage and Scene Classes
      3. Nodes and Scene Graphs
      4. Layouts
      5. The Application Class and the Life-Cycle Methods
      6. Launching a JavaFX Application
    3. A JavaFX Application Skeleton
    4. Compiling and Running a JavaFX Program
    5. The JavaFX Application Thread
    6. Build a Simple Scene Graph
  7. 2 Introducing Events and Controls
    1. Event Basics
      1. The Event Class
      2. The EventHandler Interface
      3. The Event Dispatch Chain
      4. Introducing the Button Control
      5. Demonstrating Event Handling and the Button
    2. Another JavaFX Control: CheckBox
      1. Selecting a Check Box Under Program Control
      2. Create a Three-State Check Box
    3. Handle Key and Mouse Events
      1. Key Events
      2. Mouse Events
    4. Filtering and Consuming Events
  8. 3 Exploring JavaFX Controls, Part One
    1. ToggleButton
    2. Radio Buttons
      1. Watch for Changes in a Toggle Group
      2. Obtain the Selected Radio Button in a Toggle Group
    3. ListView
      1. Enabling Multiple Selections
      2. Changing the ListView Dynamically
      3. Obtaining ListView Item Indices
    4. ComboBox
      1. Enable ComboBox Editing
      2. Show the Drop-Down List Under Program Control
    5. ChoiceBox
    6. Adding Tooltips
    7. Use a Visual Separator
  9. 4 Exploring JavaFX Controls, Part Two
    1. Text Controls
    2. ScrollPane
    3. Slider
    4. TreeView
    5. TableView
    6. Disabling a Control
    7. Other Controls to Explore
  10. 5 Work with Images, Fonts, and Layouts
    1. Use Image and ImageView
      1. Scale Images
      2. Wrap an ImageView in a ScrollPane
      3. Add Images to a Label
      4. Use an Image with a Button
    2. Introducing Fonts
    3. Explore Layout Panes
      1. FlowPane
      2. HBox and VBox
      3. BorderPane
      4. StackPane
      5. GridPane
      6. TilePane
      7. AnchorPane
  11. 6 Effects and Transforms
    1. Effects
    2. Transforms
      1. 2-D Transformations
      2. 3-D Transformations
  12. 7 Animation
    1. Animation Basics
    2. Transitions
      1. A First Example of Transitions
      2. Two More Transitions
      3. Managing Groups of Transitions
    3. Use Timeline Animation
    4. Animating 3-D Shapes
    5. A Word About Interpolators
  13. 8 Explore Menus
    1. Menu Basics
    2. An Overview of MenuBar, Menu, and MenuItem
      1. MenuBar
      2. Menu
      3. MenuItem
    3. Create a Main Menu
    4. Add Mnemonics and Accelerators to Menu Items
    5. Add Images to Menu Items
    6. Use RadioMenuItem and CheckMenuItem
    7. Create a Context Menu
    8. Create a Toolbar
    9. Use MenuButton
    10. Create a CustomMenuItem
    11. Put the Entire MenuDemo Program Together
  14. 9 Charts, WebView, and Canvas
    1. Charts
      1. Creating XYChart-Based Charts
      2. A BarChart Example
      3. Some Things to Try with the BarChart Example
      4. Creating a PieChart
    2. Display Web Content with WebView
      1. WebView
      2. WebEngine
      3. WebHistory
      4. A WebView Demonstration: Mini-Browser
    3. Drawing Directly on a Canvas
    4. What Next?
  15. Index

Product information

  • Title: Introducing JavaFX 8 Programming
  • Author(s): Herbert Schildt
  • Release date: July 2015
  • Publisher(s): McGraw-Hill
  • ISBN: 9780071842563