Translucent blurred background in JavaFx

Tags: , , , ,



I want blurred translucent background effect in my JavaFx app like in the following image.


But I cannot find any satisfactory answer anywhere.
This answer provides some workaround, it takes screenshot of background and sets it as background image. But the problem is, if background changes, it remain as it is.. (see screenshot)

Blurred Translucent Background Effect

So, I have two questions

  1. If it is possible to have true blur effect (like aero effect in windows 7) in background of JavaFx application.
  2. If yes, then how can I do it?

Answer

It’s not possible. For that to be possible, the JavaFX scene would need the information of everything below it and then render it blurred.

You could use a JNI approach as demonstrated here with Swing, but seriously: don’t. Since Aero is now dead even by Microsoft – who introduced it – I rather suggest you stick to something modern and take a different design approach.



Source: stackoverflow