JavaFX in Action
Simon Morris
  • October 2009
  • ISBN 9781933988993
  • 384 pages
  • printed in black & white

Handy book for RIA developers.

Carol McDonald, Sun Microsystems

With Java FX you can create dazzlingly rich applications for the web, desktop, and mobile devices. It is a complete RIA system with powerful presentation and animation libraries, a declarative scripting language, and an intuitive coding model—all fully integrated with the Java platform.

Assuming no previous knowledge of JavaFX, JavaFX in Action makes the exploration of JavaFX interesting and easy by using numerous bite-sized projects. You'll gain a solid grounding in the JavaFX syntax and related APIs and then learn to apply key features of the JavaFX platform through the examples. JavaFX expert Simon Morris helps you transform variables and operators into bouncing raindrops, brilliant colors, and dancing interface components. And, below the chrome, you'll master techniques to make your business applications more responsive and user friendly.

Table of Contents show full



about this book

about the title

about the cover illustration

1. Welcome to the future: introducing JavaFX

1.1. Introducing JavaFX

1.2. Minimum effort, maximum impact: a quick shot of JavaFX

1.3. Comparing Java and JavaFX Script: "Hello JavaFX!"

1.4. Comparing JavaFX with Adobe AIR, GWT, and Silverlight

1.5. But why should I buy this book?

1.6. Summary

2. JavaFX Script data and variables

2.1. Annotating code with comments

2.2. Data types

2.3. Working with text, via strings

2.4. Durations, using time literals

2.5. Sequences: not quite arrays

2.7. Working nicely with Java

2.8. Summary

3. JavaFX Script code and structure

3.1. Imposing order and control with packages (package, import)

3.2. Developing classes

3.3. Flow control, using conditions

3.4. Sequence-based loops

3.5. Repeating code with while loops (while, break, continue)

3.6. Acting on variable and sequence changes, using triggers

3.7. Trapping problems using exceptions (try, catch, any, finally)

3.8. Summary

4. Swing by numbers

4.1. Swing time: Puzzle, version 1

4.2. Better informed and better looking: Puzzle, version 2

4.3. Game on: Puzzle, version 3

4.4. Other Swing components

4.5. Bonus: using bind to validate forms

4.6. Summary

5. Behind the scene graph

5.1. What is a scene graph?

5.2. Getting animated: LightShow, version 1

5.3. Total transformation: LightShow, version 2

5.4. Lost in translation? Positioning nodes in the scene graph

5.6. Summary

6. Moving pictures

6.1. Taking control: Video Player, version 1

6.2. Making the list: Video Player, version 2

6.3. Bonus: taking control of fonts

6.4. Summary

7. Controls, charts, and storage

7.1. Comments welcome: Feedback, version 1

7.2. Chart topping: Feedback, version 2

7.3. Bonus: creating a styled UI control in JavaFX

7.4. Summary

8. Web services with style

8.1. Our project: a Flickr image viewer

8.2. Using a web service in JavaFX

8.3. Picture this: the PhotoViewer application

8.4. Size matters: node bounds in different contexts

8.5. Summary

9. From app to applet

9.1. The Enigma project

9.2. Programmer/designer workflow: Enigma machine, version 1

9.3. More cryptic: Enigma machine, version 2

9.4. From application to applet

9.5. Bonus: Building the UI in an art tool

9.6. Summary

10. Clever graphics and smart phones

10.1. Amazing games: a retro 3D puzzle

10.2. The maze game

10.3. On the move: desktop to mobile in a single bound

10.4. Performance tips

10.5. Summary

11. Best of both worlds: using JavaFX from Java

11.1. Different styles of linking the two languages

11.2. Adventures in JavaFX Script

11.3. Adding FX to Java

11.4. Summary

Appendix A: Getting started

Appendix B: JavaFX Script: a quick reference

Appendix C: Not familiar with Java?

Appendix D: JavaFX and the Java platform


What's inside

  • Covers Java FX 1.2!
  • JavaFX Script language tutorial
  • Techniques for desktop, web, and mobile development
  • How to mix Java and Java FX
  • How to connect to resources in the Cloud

About the author

Based in the UK, Simon Morris builds web and desktop applications for commercial, academic, and government clients. He blogs at

eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

Highly recommended!

Horaci Macias Viel, Avaya

Everyone will learn something from this book, I did!

Jasper Potts, Sun Microsystems

With JavaFX you can brew up industrial grade RIAs, and this book can help you craft mighty tasty pints.

Kevin Munc, Nationwide Insurance

An excellent and easy-to-read introduction to the very latest in JavaFX technologies.

Jonathan Giles, Sun Microsystems