Invisible Stage/Scene in JavaFX


Question

I'm looking for a way to hide a JavaFX Stage or Scene. Now I know about .hide(), but that won't work. I need something that still keeps the window, but just makes it completely transparent. A good analogy is display: none and visibility: hidden in CSS. Whereas the first completely and totally removes a tag/node from the screen, the second just makes it invisible. I'd like something like visibility in JavaFX, not display (which is the hide and show methods). It also might help that my stage decoration is set to TRANSPARENT. That should make things a little easier.

I've already tried moving the stage off the screen, but that makes the whole program do some unexpected things. It throws a lot of errors that it clearly shouldn't.

One more thing: If it's possible, I'd like to be able to move/interact with the window, even though you can't see it. If this is too hard, that's okay. Its not really necessary.

1
3
4/16/2014 12:52:07 AM

Accepted Answer

How about using toBack() on your Stage.

3
4/16/2014 3:29:16 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon