Quick Start Guide to JavaFX

Quick Start Guide to JavaFX

by J.F. DiMarzio
Quick Start Guide to JavaFX

Quick Start Guide to JavaFX

by J.F. DiMarzio

eBook

$27.49  $36.00 Save 24% Current price is $27.49, Original price is $36. You Save 24%.

Available on Compatible NOOK Devices and the free NOOK Apps.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Get started with JavaFX

Develop and deploy interactive client applications in no time with help from this practical tutorial from Oracle Press. With a focus on working in NetBeans IDE, Quick Start Guide to JavaFX explains how to use JavaFX layouts, draw shapes, use coloring and gradient tools, load images, apply effects and transformations, include animation, and embed media. You'll also get details on using JavaFX events, subclassing existing nodes, creating custom nodes, working with WebView, and styling your applications with CSS. Designed for easy learning, the book features:

  • Key Skills & Concepts -- Chapter-opening lists of specific skills covered in the chapter
  • Ask the Expert -- Q&A sections filled with bonus information and helpful tips
  • Try This -- Hands-on exercises that show you how to apply your skills
  • Notes -- Extra information related to the topic being covered
  • Tips -- Helpful reminders or alternate ways of doing things
  • Cautions -- Errors and pitfalls to avoid
  • Annotated Syntax -- Example code with commentary that describes the programming techniques being illustrated
  • Self-tests -- Chapter-ending quizzes to reinforce your skills

Product Details

ISBN-13: 9780071808972
Publisher: McGraw Hill LLC
Publication date: 04/04/2014
Sold by: Barnes & Noble
Format: eBook
Pages: 264
File size: 21 MB
Note: This product may take a few minutes to download.

About the Author

J.F. DiMarzio has worked in the technology departments of companies such as the U.S. Department of Defense and the Walt Disney Company. He continues to strive to push the limits of technology and develop on new, emerging platforms. Over the last 12 years, he has released 11 books, including the first edition of JavaFX: A Beginner’s Guide (McGraw-Hill Professional).

Table of Contents

Introduction xiii

1 Introduction to JavaFX 1

What is JavaFX? 2

What is needed for JavaFX Development? 2

Required Skills and Knowledge 3

Required Software 3

Required Hardware 4

Downloading and Installing the Required Software NetBeans 5

Try This: Configure Your NetBeans 8

Chapter 1 Self Test 8

2 Setting the Scene 9

Creating a New JavaFX Project 10

The (Not-so) Empty JavaFX Project 12

Examining the Project Files 14

Exploring the Project in NetBeans 14

Working with the JavaFX For Beginners.java File 17

The Comments 17

The package Statement 19

Your First Stage 20

The Application Entry Point 20

The Sample.fxml File 21

Compiling Your JavaFX Application 23

Chapter 2 Self Test 23

3 Hello World 25

What Is MVC? 26

Using JavaFX Scene Builder 27

Working with Containers 28

Working with Controls 30

Creating Your Own Hello World Application 32

Using JavaFX Binding 33

An Introduction to Methods and Properties 35

Java Methods 35

JavaFX Properties 37

Chapter 3 Self Test 40

4 Using JavaFX Layouts 41

The HBox 43

The VBox 47

Nested Layouts 48

Try This: Using Other Layouts 51

Chapter 4 Self Test 52

5 Creating Shapes 53

JavaFX Scene Graph 54

Drawing Shapes 55

Before You Begin 55

Lines 56

Rectangles 65

Polygons 68

Arcs 69

Circcles and Ellipses 72

Try This: Create Multiple Shapes 75

Chapter 5 Self Test 75

6 Using Colors and Gradients 77

Using Color 78

Predefined Colors 78

Mixing Colors 80

Using Gradients 83

Linear Gradients 83

Radial Gradients 86

Try This: Create a Custom Gradient 87

Chapter 6 Self Test 88

7 Using Images 89

The Image View Node 90

The Image Class 91

Try This: Working with Different Image Types 97

The Canvas 97

Chapter 7 Self Test 99

8 Applying Effects and Transformations 101

Effects 104

Bloom 105

Color Adjust 107

Gaussian Blur 108

Glow 111

DropShadow 113

Lighting 116

SepiaTone 120

Transformations 122

XY Transformations 123

Rotation 123

Perspective Transform 124

Try This: Combining Multiple Effects 127

Chapter 8 Self Test 127

9 Basic Animation 129

Timelines 131

Animating Along a Path 136

Try This: Create a Path Animation 140

Chapter 9 Self Test 140

10 Using Events 141

What Are Events? 142

Mouse Events 142

Key Events 151

Chapter 10 Self Test 155

11 Custom Nodes and Subclassing 157

Subclassing Node 158

Creating a Round Button 159

Try This: Create Your Own Shapes 166

Chapter 11 Self Test 166

12 Working with WebView 169

Rendering HTML 171

Communicating Between JavaScript and JavaFX 172

Chapter 12 Self Test 179

13 Style Your JavaFX with CSS 181

Adding a Style Sheet to Your Packages 183

Creating a Style 186

Using Your Styles 187

Creating Independent Style Classes 190

Try This: Experimenting with Styles 192

Chapter 13 Self Test 192

14 Embedded Media 193

Playing Video 195

Creating a Play/Pause Button 199

Chapter 14 Self Test 211

Playing Video 195

Creating a Play/Pause Button 199

Creating a Progress Indicator 205

Chapter 14 Self Test 211

A Packaging and Deploying JavaFX 213

JavaFX Packager Tool 214

Self-Contained Application Packages 218

Web Start 219

B The Swing of Things 221

JavaFX Swing Compatibility 22

Putting JavaFX in Swing Apps 223

C Answers to Self Tests 225

Chapter 1 226

Chapter 2 226

Chapter 3 227

Chapter 4 228

Chapter 5 229

Chapter 6 229

Chapter 7 230

Chapter 8 231

Chapter 9 232

Chapter 10 232

Chapter 11 233

Chapter 12 234

Chapter 13 235

Chapter 14 235

Index 237

From the B&N Reads Blog

Customer Reviews