4 JavaFX tutorials for beginners

When Sun released the first code drops of JavaFX, I excitedly absorbed all the information I could find and started writing tutorials so other developers would not need to scrounge for information like me. However, the severely alpha state of JavaFX soon cooled my zeal, and overwhelmed by the bugs and spotty documentation, I decided to stop writing tutorials.

With the release of JavaFX 1.0, I resurrected, retrofitted and in some cases completely rewrote my old tutorials to match the final version. So, below I’ve listed and described four tutorials that will hopefully serve as a decent first stepping stone for JavaFX beginners:

I took of bit of a hiatus from posting while working on a new Flash video game I hope to complete soon. Starting today however, I will go back to posting regularly, so stay tuned!

10 Minute JavaFX Tutorial - Develop and deploy JavaFX Applets and Applications while online and offline

Hello! and welcome back to another JavaFX tutorial. Today, I will walk you through deploying a JavaFX application as an applet in the browser and through Java Webstart. Additionally, I will to point you to a method and provide sample code for developing JavaFX applications offline. Instead of writing a new application, I will continue to use the “Hello, World!” application we wrote in the 10 Minute Tutorial - JavaFX: Hello World article.

Before I begin, I have both some good news and some bad news about this tutorial. The bad news first: due to a disgusting lack of documentation, this tutorial caused me plenty of plenty of headaches. I experienced moments when I almost threw my hands up in surrender and at other times, just caught my fist as it reflexively tried to pucnh a hole through my monitor. But, the good news: you shall benefit from my pain. I hope to provide you with enough information so that you won’t experience any of the issues I did and your JavaFX applications will deploy correct the first time…and every time after.

So, let’s get started! Read more

10 Minute Tutorial - JavaFX: Basic 2D Graphics and Animation

Update:

I have updated this tutorial for JavaFX 1.0

JavaFX, due to its declarative syntax, empowers developers with the ability to quickly build engaging user-interfaces that leverage eye-popping effects and animation to deliver a deeper, more visceral experience. But, you’ve got to learn to walk before you run :) so this tutorial will explore JavaFX’s basic animation concepts by creating a simple slide show containing various shapes. For added fun, each slide will have the ability to rotate. While eye-popping it is not, I think this tutorial will give you a good starting point to begin working on more complex animations. Read more

10 Minute Tutorial - JavaFX: Event handling using trigger and bind

Update:

I have updated this tutorial for JavaFX 1.0

Clearly, the creators of JavaFX Script want to make it a great MVC programming language. Nothing says this more than baking triggers and data binding into the language as first class concepts. According to the documentation, JavaFX triggers operate in the same manner as SQL triggers, allowing you to handle data modification events in an aspect-like fashion. And, the bind keyword allows unidirectional binding between a variable and a right side expression. These concepts help remove some of the tedium and typical bolier plate code in handling UI modification events. Read more

10 Minute Tutorial - JavaFX: Hello World

Over the past couple of months, I wrote a number of Microsoft Silverlight tutorials both to learn Silverlight and help other developers ramp up their Silverlight skills quickly. Now however, I’ll turn my attention to one of Silverlight’s competitors: JavaFX. If you read the JavaFX section of my introductory post, you already know that Sun has taken a very different approach than Microsoft in implementing a framework for developing easily deployed, highly-interactive, “rich” applications. So, I want to jump right in and create an application that will have everyone hanging on the edge of their seat with enthusiasm (or rolling their eyes and groaning in almost physical pain): Hello World. Read more