Javatpoint Logo
Javatpoint Logo

JavaFX Shadow Effect

As its name suggests, this effect creates the shadow of the node by duplicating the node and making its edges blur. The class named as javafx.scene.effect.Shadow represents the shadow effect. We just need to instantiate this class to generate an appropriate shadow effect.


The properties of the class along with the setter methods are described in the following table.

Property Description Setter Methods
blurType This is a blur type property. This represents the algorithm which is used to blur the shadow. setBlurType(BlurType value)
color This is of color type property. It represents the shadow color. setColor(Color value)
height It represents the vertical size of the shadow blur. setHeight(double value)
input It represents the input for this effect. setInput(Effect value)
radius It represents the radius of the shadow. setRadius(double value)
width It represents the horizontal size of the shadow blur. setWidth(double value)


The class contains three constructors.

  1. public Shadow() : Creates a new instance with the default parameters
  2. public Shadow(double radius, Color color) : Creates a new instance with the specified radius and color.
  3. public Shadow(BlurType blurtype, Color color, double radius) : Creates a new instance with the specified radius, color and blur type.


JavaFX Shadow Effect

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA