• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Stages and Focus in javafx

 
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a stage that I want to keep at the back of the desktop behind any other windows.

If I use stage.toBack(), then the stage flickers as it goes to the back of screen once pressed on.
So my partial solution was to use a transparent stage in front of this.
The transparent stage, I call it a "Visor", could accept mouse input and apply it to the main stage behind,
and it would prevent the main stage from being pressed on, so it will never be focused on and come to the front of screen.

This works, but there's an issue.
Suppose the main stage is at the back, and the visor is in front, and suppose firefox browser is partially covering the visor.
Then when the visor is pressed on, it will be focused and so come to the front of the screen, in front of firefox.
So after releasing mouse, and pressing on part of the firefox browser, it will not accept mouse input since its actually the visor that is being pressed on.
So basically I can't control the Z-order of this stage, except for toFront() or toBack(), but that doesn't stop the sandwhiching effect of a browser going inbetween the 2 stages.

I hope thats clear, please let me know if theres any suggestions to fix it, as its driving me up the wall.

Thanks very much.
 
Happily living in the valley of the dried frogs with a few tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic