JavaFX 8: Introduction by Example, Second Edition

Book description

JavaFX 8: Introduction by Example shows you how to use your existing Java skills to create graphically exciting client applications with the JavaFX 8 platform. The book is a new and much improved edition of JavaFX 2.0: Introduction by Example, taking you through a series of engaging, fun-to-work examples that bring you up to speed on the major facets of the platform. It will help you to create applications that look good, are fun to use, and that take advantage of the medium to present data of all types in ways that engage the user and lead to increased productivity.

Entirely example-based, JavaFX 8: Introduction by Example begins with the fundamentals of installing the software and creating a simple interface. From there, you'll move in progressive steps through the process of developing applications using JavaFX's standard drawing primitives. You'll then explore images, animations, media, and web. This new edition incorporates the changes resulting from the switch to Java 8 SDK. It covers advanced topics such as FXML, charting, custom controls, JavaFX 3D, gesture devices, and embedded systems. Best of all, the book is full of working code that you can adapt and extend to all your future projects.

  • Entirely example-based

  • Filled with fun and practical code examples

  • Covers all that's new in Java 8 relating to JavaFX such as Lambda expressions and Streams

  • Covers gesture devices, 3D display, embedded systems, and other advanced topics

  • What you'll learn

  • Install JavaFX 8 and configure your environment

  • Work with touch-based interfaces such as in Windows 8

  • Interpret gesture-based events the Leap Motion Controller and similar hardware

  • Integrate JavaFX with embedded systems such as Arduino and Raspberry Pi

  • Develop modern GUI implementations of business forms

  • Work with shapes, color, text, and animation

  • Add audio and video to your projects

  • Create custom controls using SVG and Canvas

  • Learn to style a user-interface via CSS

  • Communicate bidirectionally using Java and Javascript with HTML5

  • Who this book is for

    JavaFX 8: Introduction by Example is for Java developers who are interested in developing rich, client-side applications to run on PCs, phones, tablets, Arduino controllers, the Raspberry Pi, and more. Whether enterprise developer or hobbyist, anyone wanting to develop a polished user-interface from Java will find much to like in this book.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Authors
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. Chapter 1: Getting Started
      1. Installing Required Software
      2. Creating a JavaFX Hello World Application
      3. Walking Through the Code
      4. Summary
    10. Chapter 2: JavaFX Fundamentals
      1. JavaFX Lines
      2. Drawing Lines
      3. Drawing Shapes
      4. Drawing Complex Shapes
      5. Painting Colors
      6. Drawing Text
      7. Summary
    11. Chapter 3: Lambdas and Properties
      1. Lambda
      2. Lambda Expressions
      3. Functional Interfaces
      4. Default Methods
      5. Properties and Binding
      6. Binding
      7. A Logon Dialog Example
      8. Summary
    12. Chapter 4: Layouts and UI Controls
      1. Layouts
      2. UI Controls
      3. The ObservableList Collection Class
      4. Working with TableViews
      5. Generating a Background Process
      6. Summary
    13. Chapter 5: Graphics with JavaFX
      1. Working with Images
      2. A Photo Viewer Example
      3. Animation
      4. A News Ticker Example
      5. Summary
    14. Chapter 6: Custom UIs
      1. Theming
      2. JavaFX CSS
      3. Scene Builder
      4. Custom Controls
      5. Summary
    15. Chapter 7: Media with JavaFX
      1. Media Events
      2. Playing Audio
      3. An MP3 Player Example
      4. Playing Video
      5. A Video Player Example
      6. Simulating Closed Captioning: Marking a Position in a Video
      7. Summary
    16. Chapter 8: JavaFX on the Web
      1. WebEngine
      2. Viewing HTML5 Content (WebView)
      3. WebEvents
      4. Weather Widget Example
      5. Summary
    17. Chapter 9: JavaFX 3D
      1. Basic 3D Scenes in JavaFX
      2. Primitives
      3. Interacting with Your Scene
      4. Beyond the Basics
      5. Summary
    18. Chapter 10: JavaFX and Arduino
      1. The Arduino Board
      2. The Arduino IDE
      3. Serial Reading
      4. JavaFX, the Charting API, and Sensor Readings
      5. Now, What?
      6. Summary
    19. Chapter 11: JavaFX on the Raspberry Pi
      1. Preparing the Raspberry Pi for JavaFX
      2. Installing JDK8
      3. Installing and Configuring NetBeans 8 for Raspberry Pi Development
      4. RaspiCycle: The Code
      5. Explanation of the Code
      6. Using NetBeans with the Raspberry Pi
      7. Summary
    20. Chapter 12: JavaFX and Gestures
      1. Recognizing Gestures in Your Application
      2. The Leap Motion Controller
      3. Creating a Shooting Star
      4. Creating a Water Ripple Effect
      5. More Examples
      6. Summary
    21. Chapter 13: References
      1. Java 8 SDK
      2. Java 8 API Documentation
      3. IDEs
      4. Deploying Applications
      5. JavaFX 2D Shapes
      6. JavaFX Color
      7. Java 8’s Language Features
      8. Properties and Bindings
      9. Layouts
      10. JavaFX Tools
      11. Enterprise GUI Frameworks
      12. Domain-Specific Languages
      13. Custom UIs
      14. Operating System Style Guidelines
      15. JavaFX Media
      16. JavaFX on the Web
      17. JavaFX 3D
      18. JavaFX Gaming
      19. Java & JavaFX Embedded
      20. Software and Device Manufacturers
      21. JavaFX Communities
      22. Applications
      23. Java/JavaFX Books and Magazines
      24. Author Blogs
    22. Index

    Product information

    • Title: JavaFX 8: Introduction by Example, Second Edition
    • Author(s): Carl Dea, Mark Heckler, Gerrit Grunwald, José Pereda, Sean M. Phillips
    • Release date: June 2014
    • Publisher(s): Apress
    • ISBN: 9781430264606