O'Reilly logo

JavaFX in Action by Simon Morris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. JavaFX Script code and structure

This chapter covers

  • Writing, inheriting, and using classes
  • Mixing code with conditions and loops
  • Running code when a variable changes
  • Dealing with accidents and the unexpected

In chapter 2 we looked at JavaFX Script’s data types and manipulations; this chapter looks at its code constructs. Separating the two is somewhat arbitrary—we saw plenty of code hiding in the previous chapter’s examples because code and data are flip sides of the same coin. Ahead we’ll see how the concepts we discovered last chapter integrate into the syntax as a whole. Our grounding in data will hopefully engender a more immediate understanding as we encounter conditions, loops, functions, classes, and the like.

As mentioned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required