XQ DD
XQ DD

Reputation: 59

How to make JavaFX Stage always on bottom?

There is a setAlwaysOnTop() method, but I need make a 'always-on-bottom' windows or a window pinned to the desktop to, I want to create a application work like Windows 7 Gadgets.

Upvotes: 1

Views: 332

Answers (1)

Robert Rohm
Robert Rohm

Reputation: 341

Window management in general is something that the operating system has to take care of. The JVM (and hence JavaFX, too) only uses OS features. So, in Java/JavaFX, we can only use those features that the JVM + Java + JavaFX API uses. AFAIK, there is no method like "always on bottom" there (and also not in some other development environments that let you build native applications).

If you need to send windows to the background or even need to monitor window depth, then you are looking for OS features. You would have to use the Windows Platform SDK. You would need to use the Java Native Interface e.g., in order to call Windows functions from Java.

Upvotes: 1

Related Questions