Drop-shadow in an undecorated Pane

前端 未结 4 1994
时光说笑
时光说笑 2020-12-06 07:15

I\'m trying to make my Pane a little bit better, visually, so, what I\'m doing is: set my stage UNDECORATED (OK) and (TRYING) to add a drop-shadow effect (NOT OK).

I\

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 07:59

    Well, I found a very simple solution. Maybe this was not supported in earlier versions? However.. The code:

    iconPane.setEffect(new DropShadow(2d, 0d, +2d, Color.BLACK));
    

    The picture shows the result - my intention was to show a icon in the look of a FAB

    enter image description here

提交回复
热议问题