How to get all top level window javafx?

前端 未结 3 1217
忘了有多久
忘了有多久 2021-01-13 05:38

I saw a method in AWT: java.awt.Window.getWindows(). In JavaFx, is there any method to get all window JavaFx application?

Thanks,

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 06:13

    for javafx8 running java8 use

    FXRobotHelper.getStages()
     or 
    StageHelper.getStages()
    

    This will retrieve all Stages which is essentially a Window itself ( it extends Window class)

提交回复
热议问题