Teach Yourself JavaFX - Sample Projects in the Netbeans IDE
The NetBeans IDE for JavaFX comes with ready-to-build JavaFX sample projects included.
You can immediately build and run these projects to see what the sample does.
In this tutorial we will have a look at the source code of various sample projects
and learn how the demonstrated features are implemented.
If you don't have any NetBeans IDE bundle installed,
download the NetBeans IDE for JavaFX.
The download already includes the sample projects that we discuss here!
Set-Up
This short screencast shows you how to confirm that you have the JavaFX plugin installed in the NetBeans IDE, or how to install it if necessary.
It also shows you how to access the included sample projects from the New Project wizard, and open them in the IDE.
Open at least the following four projects: Simple Video Player, Spring Animation, Drag And Drop, and Photo Flip before you continue.
JavaFX Sample Project: Simple Video Player
This short demo shows that JavaFX comes with ready-to-use multi-media components
(such as a movie player) that you easily embed in your application.
JavaFX Sample Project: Spring/Bounce Animation
Interpolators describe the acceleration and deceleration of an animation —
in JavaFX, you can use standard built-in interpolators such as discrete, linear or ease-in/ease-out.
This short demo shows how you define custom motions, for example a bounce or a spring motion.
JavaFX Sample Project: Drag and Drop
In this short demo you'll see two implementations of the same drag and drop behavior.
In the first version, the dragged object is a custom image node.
The approach shown in the second version can be applied to any type of target node
and you will see that it is therefor more flexible.
JavaFX Sample Project: Photo Flip
Nodes such as images have an effect attribute that you can bind to various functions.
In this short demo you will see how to use a perspective transform that applies a 3D effect to a 2D image.
There are many more built-in effects such as drop shadows, blurs, glows.
You can apply these effects to any graphic node, including shapes, text, and videos, not just images.