O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

In this recipe, we have made use of the following effects:

  • javafx.scene.effect.BoxBlur
  • javafx.scene.effect.MotionBlur
  • javafx.scene.effect.GaussianBlur
  • javafx.scene.effect.DropShadow
  • javafx.scene.effect.InnerShadow
  • javafx.scene.effect.Reflection

The BoxBlur effect is created by specifying the width and height of the blur effect, and also the number of times the effect needs to be applied:

BoxBlur boxBlur = new BoxBlur(10,10,3);

The MotionBlur effect is created by providing the angle of the blur and its radius. This gives an effect of something captured while in motion:

MotionBlur motionBlur = new MotionBlur(90, 15.0);

The GaussianBlur effect is created by providing the radius of the effect, and the effect uses the Gaussian ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required