Java Reference
In-Depth Information
Figure 13-1. The Vanishing Circles application demonstrating JavaFX effects, animation, and interaction
Vanishing Circles in Java
To start with, let's show the code in standard Java imperative style. This is the most verbose way of writing JavaFX
code, but it is also the most straightforward for anyone familiar with the Java programming language and earlier UI
toolkits such as Swing. The full code listing for writing this example is shown in Listing 13-1.
Listing 13-1. Vanishing Circles Application Written in Imperative Java Style
public class VanishingCircles extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Vanishing Circles");
Group root = new Group();
 
Search WWH ::




Custom Search