I saw a method in AWT: java.awt.Window.getWindows()
.
In JavaFx, is there any method to get all window JavaFx application?
Thanks,
AFAIK, there is still no proper way to do this.
Although there is a dirty and short term way :
Browsing the source code of javafx.stage.Window, there is a static method which seems to do what you are expecting : javafx.stage.Window#impl_getWindows()
.
But there is a bunch of disclaimers :
/**
* Return all Windows
*
* @return Iterator of all Windows
* @treatAsPrivate implementation detail
* @deprecated This is an internal API that is not intended for use and will be removed in the next version
*/
@Deprecated
@NoInit
public static Iterator impl_getWindows() {
final Iterator iterator = AccessController.doPrivileged(
new PrivilegedAction() {
@Override public Iterator run() {
return windowQueue.iterator();
}
}
);
return iterator;
}