The javafx.scene.effect.DropShadow effect is a shadow which imitates different light source locations, and is drawn outside the shadowed node, as in the following example:
To add DropShadow, you just need to instantiate a corresponding class with the desired parameters:
// chapter8/basiceffects/DropShadowDemo.javapublic void start(Stage stage) throws Exception { Circle red = new Circle(50, Color.RED); red.setEffect(new DropShadow()); Circle yellow = new Circle(50, Color.YELLOW); yellow.setEffect(new DropShadow( 10, // shadow radius 10, 0, // x,y offset Color.DARKGRAY)); Circle green = new Circle(50, Color.GREEN); green.setEffect(new ...