How to make JavaFX app always on top of other applications?


Question

I made a JavaFX application that is launched as a Mac App. I want it to be launched so that the window is always on top of other applications. How can I do this?

1
3
5/30/2014 7:15:27 AM

Accepted Answer

As of Java 8u20-ea-b15, and Java 8u6, you can do stage.setAlwaysOnTop(true);

At the time of writing, neither of these are production releases. However, if you are creating a self-contained application, there's nothing to stop you using the ea release and bundling that JVM until these are fully released. (Java 8u6 is probably only a matter of days away.)

8
5/30/2014 3:36:05 PM

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