0

I am currently implementing an ScalaFX application which needs to get on top of all other (non related applications, arbitrary OS windows) windows when a specific event occurs. I searched the Internet and found some answers which are kind of a hack for the required behavior. However, none of this worked. I tested so far:

  • setFocused routine
  • set modality
  • using JSwing dialog (results in non reactive window)

It seems there has been a fix in Java 8u20 by introducing a property alwaysOnTop, however I cannot install 8u20 on the targeting machines, and have to use Java 7 instead.

Is there a proper fix around to set a Window (not always, but at specific event) on top of all windows?

smoes
  • 591
  • 2
  • 17
  • One somewhat dirty hack which should work is to show your JavaFX scene inside a Swing JDialog window, which does have an alwaysOnTop property. [Here's an example in JavaFX](http://snipplr.com/view/69423/javafx-always-on-top/) (it's not my code). – Cyäegha Nov 04 '14 at 21:49
  • Thank you for your comment. I tried but is results in an unresponsive, grayed out, window. – smoes Nov 14 '14 at 09:15

0 Answers0