0

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?
Community
  • 1
  • 1
Ashish
  • 325
  • 3
  • 9
  • I haven't got a Windows system, to try it, but did you try the StageStyle.UNIFIED and does that work? I think the behavior of UNIFIED is OS version specific, so I don't think it is not a generic solution for all systems.To test, you will need to take extra care that anything you put on the UNIFIED stage has no background (e.g. even a common stack pane usually has a background in JavaFX) and that the scene itself has no background color (which is not the default for a scene). – jewelsea Aug 12 '15 at 19:29
  • @jewelsea: It doesn't work. Not on Win7. Not even with Java 8u60 where it's supposed to be fixed. All I get is a black screen. – Roland Aug 13 '15 at 01:33

2 Answers2

1

I was looking for info on whether 3D shapes could be translucent and came across your post. Have you seen this answer which shows how to make windows with translucent backgrounds? Perhaps that would help get you to something like what you are envisioning. How to implement a transparent pane with non transparent children

Community
  • 1
  • 1
Phil Freihofner
  • 7,645
  • 1
  • 20
  • 41
  • Making the parent pane translucent can be done easily. But having the **translucent _blurred_** background thats what I was looking for. – Ashish Mar 10 '16 at 06:43
0

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.

Community
  • 1
  • 1
Roland
  • 18,114
  • 12
  • 62
  • 93