Adding Animation with JavaFX: Spicing Up a Clear

We return to the same drawing program we described in two previous posts, Sketch Pad: Custom Binding and JavaFX Sketch Pad: Version 2. In this third version, we’re going to spice up the Clear button by animating a fade. That is, when a user clicks Clear, the drawing elements fade out, one at a time […]

JavaFX Sketch Pad: Version 2

In our previous post we presented a JavaFX Sketch Pad example that uses three RGB sliders to manipulate a drawing line’s color. In this post, we’ll use a color picker made with all the JavaFX built-in colors. Since JavaFX colors are are static fields with familiar (and maybe not so familiar) names like BLUE, GREEN, […]

JavaFX Sketch Pad: Custom Binding

Sketch pad programs are fun to build and fun to test. And writing a sketch pad program in JavaFX is no different, except that maybe it’s more fun. So, what constructs do we need to create a decent sketch pad program in JavaFX? At the minimum, we need to Detect mouse events for mouse click, […]

JavaFX Animation and Binding: Using the ProgressBar

Our previous post describes a JavaFX countdown timer. Let’s take that same program and add a progress bar control. As the timer counts down, the progress bar gradually fills in—as shown in the screenshot here. When the timer begins (at 15), the progress bar is empty (all gray) and when the timer reaches 0, the […]

JavaFX Animation and Binding: Simple Countdown Timer

JavaFX has a powerful animation feature that’s flexible and easy to use. I’m going to build a simple countdown timer that uses animation to countdown a numeric display from 15 (for example) to zero. I can imagine such a timer in some sort of response game that limits the time you have to make a […]