concept JavaFX scene graph in category java

appears as: JavaFX scene graph, JavaFX scene graph
JavaFX in Action

This is an excerpt from Manning's book JavaFX in Action.

The RainDrop class is a Node that can be rendered in a JavaFX scene graph. It’s constructed from other nodes, specifically several instances of the Ripple class, each of which draws and animates one circle (a ripple) in the drop animation. When the RainDrop.start(x:Integer,y:Integer) function is called, it fires up a Timeline, which periodically starts the timeline inside each Ripple, transitioning the radius, opacity, and stroke width of the circle to make it animate.

Figure 10.1. Get lost! This is our simple 3D maze game. The whole thing is constructed from the JavaFX scene graph, using basic shapes.

The preview release of JavaFX (pre 1.0) featured a Canvas class, acting as a bridge between the JavaFX scene graph and AWT/Swing. Sadly, this class was removed from the full release, making it impossible to pass anything except Swing wrapper nodes back to a Java UI. But even without the scene graph, this technique is still useful, for the following reasons:

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest